Solved

OLE Structured Storage - Visual C++

Posted on 1997-06-25
1
257 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Run Program using VBScript 3 80
SQL to ElasticSearch Query 1 777
Microsoft Query from QuickBooks 9 76
Having a different time zone on your task bar 3 78
This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…

726 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