[ComVisible(false)]
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("00000001-0000-0000-C000-000000000046")]
public interface IClassFactory
{
void CreateInstance(IntPtr pUnkOuter, ref Guid riid, out IntPtr ppvObject);
void LockServer(bool fLock);
}
An other alternative
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("00000001-0000-0000-C000-000000000046")]
public interface IClassFactory
{
[PreserveSig]
int CreateInstance(IntPtr pUnkOuter, ref Guid riid, out IntPtr ppvObject);
[PreserveSig]
int LockServer(bool fLock);
}
<ComVisible(False), _
ComImport(), _
InterfaceType(ComInterfaceType.InterfaceIsIUnknown), _
Guid("00000001-0000-0000-C000-000000000046")> _
Public Interface IClassFactory
Sub CreateInstance(ByVal pUnkOuter As IntPtr, ByRef riid As Guid, <Out()> ByVal ppvObject As IntPtr)
Sub LockServer(ByVal fLock As Boolean)
End Interface
None.