Solved

OLE Structured Storage - Visual C++

Posted on 1997-06-25
1
253 Views
Last Modified: 2013-12-03
Here's the situation:

I'm developing in VC++1.52.  
I have successfully created the following structured storage:

root storage

  "Original" - Sub Storage
                       "OriginalStream"  -  Stream
 " Archive" - Sub Storage

 " Loaded" - Sub Storage

 I can see that my storage structure  exists by using the editor in VC++ 5.0.  

PROBLEM:

When I try to open the "Original Stream" with the OpenStream  function, I get an INVALID_PARAMETER error.  
By looking at my structure is there an obvious problem with my design?  or Is there a problem with my call and if so what?
:
LastError = AsciiStorage.pIstorage->OpenStream("ORIGINALSTREAM",NULL,STGM_READWRITE | STGM_SHARE_EXCLUSIVE,0,&AsciiStream.pIStream);


Thanks

0
Comment
Question by:mtgcpc
1 Comment
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 200 total points
ID: 1399251
There's one thing I noticed is that the first argument to OpenStream is declared as

  const OLECHAR __RPC_FAR *pwcsname

Have you tried using L"OriginalStream"? All the other parameters look okay. What about AsciiStorage.pIstorage? Have you verified that opened okay and that it is the substorage and not the root storage?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now