Todd,
You will have to declare StgCreateStorageEx yourself, and use COM
interop to declare the interfaces you need. The declaration of
StgCreateStorageEx is as follows:
[DllImport("ole32.dll")]
public static extern int StgCreateStorageEx(
[MarshalAs(UnmanagedType.LPWStr)]
string pwcsName,
[MarshalAs(UnmanagedType.U4)]
int grfMode,
int stgfmt,
[MarshalAs(UnmanagedType.U4)]
int grfAttrs,
IntPtr pStgOptions,
IntPtr reserved2,
ref Guid riid,
[MarshalAs(UnmanagedType.Interface)]
ref Object ppObjectOpen);
You will have to marshal the pStgOptions parameter yourself, as it can
accept null.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Todd Webb said:
I would like to talk to the COM implementation of
Structured Storage from C#. I would like a C# equivalent
of StgCreateStorageEx.
I expected to find support in the stdole Primary Interop
Assembly, but I have not been able to find it.