Solved

OLE Structured Storage - Visual C++

Posted on 1997-06-25
1
258 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

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…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

623 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