Hi again Jay.
Ok Here are some snippets from my code.
First the definition of the interface IStorage:
________________________________________________________________
<Guid("0000000B-0000-0000-C000-000000000046"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComConversionLoss()> _
Public Interface IStorage
Function Commit(ByVal grfCommitFlags As STGC) As Integer
Function CopyTo(ByVal ciidExclude As Integer, ByVal rgiidExclude As
LPGUID, ByVal snbExclude As IntPtr, ByVal pstgDest As IStorage) As Integer
Function CreateStorage(<MarshalAs(UnmanagedType.LPWStr)> ByVal pwcsName As
String, ByVal grfMode As STGM, ByVal reserved1 As Integer, ByVal reserved2
As Integer, ByRef ppstg As IStorage) As Integer
Function CreateStream(<MarshalAs(UnmanagedType.LPWStr)> ByVal pwcsName As
String, ByVal grfMode As STGM, ByVal reserved1 As Integer, ByVal reserved2
As Integer, ByRef ppstm As IStream) As Integer
Function DestroyElement(<MarshalAs(UnmanagedType.LPWStr)> ByVal pwcsName
As String) As Integer
Function EnumElements(ByVal reserved1 As Integer, ByVal reserved2 As
IntPtr, ByVal reserved3 As Integer, ByRef ppenum As IEnumSTATSTG) As Integer
Function MoveElementTo(<MarshalAs(UnmanagedType.LPWStr)> ByVal pwcsName As
String, ByVal pstgDest As IStorage, <MarshalAs(UnmanagedType.LPWStr)> ByVal
pwcsNewName As String, ByVal grfFlags As STGMOVE) As Integer
Function OpenStorage(<MarshalAs(UnmanagedType.LPWStr)> ByVal pwcsName As
String, ByVal pstgPriority As IntPtr, ByVal grfMode As STGM, ByVal
snbExclude As IntPtr, ByVal reserved As Integer, ByRef ppstg As IStorage) As
Integer
Function OpenStream(<MarshalAs(UnmanagedType.LPWStr)> ByVal pwcsName As
String, ByVal reserved1 As IntPtr, ByVal grfMode As STGM, ByVal reserved2 As
Integer, ByRef ppstm As IStream) As Integer
Function RenameElement(<MarshalAs(UnmanagedType.LPWStr)> ByVal pwcsOldName
As String, <MarshalAs(UnmanagedType.LPWStr)> ByVal pwcsNewName As String) As
Integer
Function Revert() As Integer
Function SetClass(ByVal clsid As LPGUID) As Integer
Function SetElementTimes(<MarshalAs(UnmanagedType.LPWStr)> ByVal pwcsName
As String, ByVal pctime As FILETIME, ByVal patime As FILETIME, ByVal pmtime
As FILETIME) As Integer
Function SetStateBits(ByVal grfStateBits As Integer, ByVal grfMask As
Integer) As Integer
Function Stat(ByRef pstatstg As STATSTG, ByVal grfStatFlag As STATFLAG) As
Integer
End Interface
_______________________________________________________________________
Next, the declaration of the StgCreateStorageEx
________________________________________________________________________
Declare Function StgCreateStorageEx Lib "ole32.dll" ( _
<MarshalAs(UnmanagedType.LPWStr)> ByRef pwcsName As String, _
ByVal grfMode As Int32, _
ByVal stgfmt As Int32, _
ByVal grfAttrs As Int32, _
<MarshalAs(UnmanagedType.Struct)> ByRef pStgOptions As STGOPTIONS, _
ByVal reserved As Int32, _
ByVal riid As Guid, _
ByRef ppObjectOpen As Object) As Integer
_______________________________________________________________________
Finaly, the call itself
_______________________________________________________________________
Dim objIStorage As IStorage()
Dim R As Integer
R = StgCreateStorageEx(PATH, _
STGM.STGM_READWRITE Or STGM.STGM_SHARE_EXCLUSIVE, _
STGFMT.STGFMT_ANY, _
0, _
StgOptions, _
0, _
IID_Storage, _
objIStorage)
________________________________________________________________________
The call goes through but the function returns a STG_E_INVALIDPOINTER error
value.
FYI: As I mentioned, I crossposted this in the Interop bucket. So far I've
gotten ziltch from that group. But then again they don't get out of bed
until 4:00 PM. Just kidding.
Thanks again for your interest.
Dave