Solved

OLE Structured Storage - Visual C++

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 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

12 Experts available now in Live!

Get 1:1 Help Now