18 questions
2 votes
1 answer
75 views
Should ILockBytes::SetSize preserve existing data?
I have read the MSDN documentation about ILockBytes::SetSize(), but it does not answer precisely whether my implementation of SetSize() should preserve existing data. For example, if the current ...
0 votes
0 answers
118 views
How I can "convert" IStorage to a byte array or to an IStream?
I have implemented a drag-and-drop receiver (C++, WINAPI). It allows me to get a storage with a dragged object (OLE IStorage object). I need to "convert" it to a byte array (something like a ...
0 votes
1 answer
130 views
How to save a storage (IStorage) object to a file (С++)?
I have got a storage, created from MS Outlook letter dragged to my window. How can I save it's (storage) contents as a file in a single file ? I have read MSDN about manipulations with storages - ...
0 votes
0 answers
157 views
Making an IStorage object point to a folder path
I'm trying to change the keyword property (under the Summary Information property set) of a folder. I am aware that I can accomplish this using the StgCreatePropSetStg() function, which takes an ...
1 vote
2 answers
294 views
IStorage does not unlock after commit
When I run the prog below, the result value of the stgOpenStorage is STG_E_SHAREVIOLATION. How should I close the IStorage to get it unlocked? procedure TForm1.btnSaveClick(Sender: TObject); var ...
0 votes
1 answer
174 views
How can I check the type of the enumerated IStorage element in Delphi?
I need to work with IStorage and IStream interfaces in Delphi 7. I need the name list of storages and streams in IStorage instances. If I try to collect them like this: procedure TStorageUtility....
0 votes
1 answer
286 views
From C#, how do I call Release on a returned object that implements IStorage?
I'm reading and writing Structured Storage files from C#. To open the file i call IStorage StorageInterface; int result = StgOpenStorage(filename, null, STGM.READWRITE | STGM.SHARE_EXCLUSIVE, IntPtr....
2 votes
1 answer
384 views
Access violation when calling EnumElements of IStorage
I am reading a structured storage file. And trying to get all child elements of the root structure. But I am getting access violation exception while doing so. Here is the native methods, [ComImport]...
0 votes
1 answer
726 views
Read / write a file in a shell namespace extension using shell APIs
I've used SHGetDesktopFolder() to get a PIDL and then walked down it's contents using IShellFolder. I now have a particular PIDL referencing a filesystem location, and I can use BindToStorage and ...
1 vote
1 answer
749 views
EML to MSG conversion fails when IStorage is used
I am trying to convert EML in to MSG file. I create mapi object IMessage on IStorage object; Assign class-id CLSID_Message to IStorage object; Parse EML file, read properties and assign them to mapi ...
0 votes
1 answer
293 views
Save MAPI IMsgStore in IStream implementation
I'm trying to create pst msg store using IMAPISession method: pses_->OpenMsgStore(0, prows->aRow[0].lpProps[1].Value.bin.cb, (LPENTRYID)prows->aRow[0].lpProps[1].Value.bin.lpb, NULL, ...
1 vote
1 answer
81 views
Firefox Extension executeAsync Returns only 15 rows at a time
I am developing a firefox extension which reads and writes to a sqlite database. I ran an async query to fetch 20 rows from a database, and the callback function which handles the receipt of data gets ...
3 votes
0 answers
563 views
Opening an IStorage from an IStream
I'm implementing a property handler for a structured storage file and would like to initialize it with IInitializeWithStream given its benefits of isolation, handling slow transfer, etc. But I see no ...
0 votes
1 answer
289 views
Opening Office 2007 Documents from in memory storage - How?
I'm a C++ developer wrestling with updating an application that had made extensive use of the IStorage interface to open pre-Office 2007 documents from in-memory storage (via ILockBytes). If you are ...
3 votes
5 answers
3k views
Releasing an OLE IStorage file handle in C#
I'm trying to embed a PDF file into a Word document using the OLE technique described here: https://learn.microsoft.com/en-us/archive/blogs/brian_jones/embedding-any-file-type-like-pdf-in-an-open-xml-...