Charles,
>One thing I am not sure of is whether I have to include an 'Inherits
>IPersist' at the start
You can, but you still have to duplicate the base interface methods in
the derived interface. See below
>(which itself would include an Inherits IUnknown)
IUnknown shouldn't be declared, since you don't write your own
implementation for it. The runtime takes care of it.
Try it like this
<ComImport(), Guid("0000010c-0000-0000-C000-000000000046"), _
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
Interface IPersist
Sub GetClassID(ByRef pClassId As Guid)
End Interface
<ComImport(), Guid("7FD52380-4E07-101B-AE2D-08002B2EC713"), _
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
Interface IPersistStreamInit : Inherits IPersist
Shadows Sub GetClassID(ByRef pClassId As Guid)
<PreserveSig()> _
Function IsDirty() As Integer
Sub Load(ByVal pStm As IStream)
Sub Save(ByVal pStm As IStream, _
<MarshalAs(UnmanagedType.Bool)> ByVal fClearDirty As Boolean)
Sub GetMaxSize(ByRef pCbSize As Long)
Sub InitNew()
End Interface
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.