Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

OLE Structured Storage - Visual C++

Posted on 1997-06-25
1
Medium Priority
?
260 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 400 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
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…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

824 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