[DllImport("ole32.dll")]
static extern int StgCreateStorageEx([MarshalAs(UnmanagedType.LPWStr)] string
pwcsName, uint grfMode, uint stgfmt, uint grfAttrs, [In] ref STGOPTIONS
pStgOptions, IntPtr reserved2, [In] ref Guid riid,
[MarshalAs(UnmanagedType.IUnknown)] out object ppObjectOpen);
None.
None.
Define the ulSectorSize member of the STGOPTIONS structure using type uint (which is 32-bits in C#) instead of ulong (which is 64-bits in C#).
Please add some more!
Please add some!
The Visual Studio SDK now has an OLE InterOp dll (freely available) that wraps all the structured storage functionality. The System.IO.Package in the NET 3.0 also wraps it in internal methods - but you can access them through the packaging api's.
See StgOpenStorageEx for an example of using the System.IO.Packaging classes to access OLE structured storage.