Questions tagged [istorage]

15 questions
5
votes
2 answers

Drag and drop from C# to Windows Explorer with IStorage/IStream

I've been working on what sounds like simple functionality for way too long now. The idea is that I have an application with a TreeView. This treeview represents contents of a database organized into files and folders, much like Windows Explorer. So…
Eric
4
votes
1 answer

Is IStorage's Compound File Implementation thread-safe?

I'm using IStorage's Compound File Implementation from C# (StgCreateDocfile). Is it safe to access one IStorage / IStream instance from multiple threads, provided I synchronized the reads and writes myself? Or are there any COM issues that might be…
Stefan Schultze
  • 9,240
  • 6
  • 35
  • 42
3
votes
0 answers

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 obvious way to open an IStorage from an IStream.…
Heath
  • 2,986
  • 18
  • 21
3
votes
4 answers

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-file I've tried to implement the C++ code…
Bernard Darnton
  • 338
  • 2
  • 11
2
votes
1 answer

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…
fhnaseer
  • 7,159
  • 16
  • 60
  • 112
1
vote
1 answer

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 called twice. The first time it return 15 rows…
Heshan Perera
  • 4,592
  • 8
  • 44
  • 57
1
vote
2 answers

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 fileName : string; streamName : string; …
SOLID Developper
  • 672
  • 4
  • 12
1
vote
1 answer

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 IMessage object; Called Save() on mapi IMessage…
user1174790
  • 309
  • 4
  • 11
0
votes
0 answers

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 IStorage object that will contain the property sets. I…
Eliazar
  • 301
  • 3
  • 13
0
votes
1 answer

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.collectElementNamesByType( iStg_ : IStorage; names_ :…
User007
  • 187
  • 10
0
votes
1 answer

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.Zero, 0, out StorageInterface); This works and I…
John Mott
  • 119
  • 1
  • 12
0
votes
1 answer

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 still following me so far, you probably know that…
John S
  • 1
  • 1
0
votes
4 answers

VCL alternative to IStorage

To preface I am using Borland C++ and the VCL. I need some sort of structured storage object which can be saved to disk as a single file and can contain multiple named blobs of binary data which I can programatically enumerate, access and…
QAZ
  • 4,870
  • 6
  • 36
  • 50
0
votes
1 answer

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 IStorage to .OpenStream() and .Write() a file. This…
EB.
  • 3,383
  • 5
  • 31
  • 43
0
votes
1 answer

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, MDB_WRITE | MAPI_DEFERRED_ERRORS | MAPI_BEST_ACCESS | MDB_NO_MAIL,…
zabulus
  • 2,373
  • 3
  • 15
  • 27