[DllImport("ole32.dll")]
static extern int CreateILockBytesOnHGlobal(IntPtr hGlobal, bool
fDeleteOnRelease, out ILockBytes ppLkbyt);
or
[DllImport("ole32.dll",
EntryPoint="CreateILockBytesOnHGlobal",
ExactSpelling=true, PreserveSig=true, CharSet=CharSet.Ansi,
CallingConvention=CallingConvention.StdCall)]
static extern int CreateILockBytesOnHGlobal(IntPtr /* HGLOBAL */ hGlobal, bool fDeleteOnRelease, [MarshalAs(UnmanagedType.Interface)]out object /* ILockBytes** */ ppLkbyt);
Public Class Win32
<DllImport("ole32.dll")> _
Public Shared Function CreateILockBytesOnHGlobal(ByVal hGlobal As IntPtr, _
ByVal fDeleteOnRelease As Boolean, _
<Out()> ByRef ppLkbyt As IlockBytes) _
As Integer
End Function
End Class
None.
None.
Please add some!
With VB.NET,
Dim lockbytes As IlockBytes = Nothing
Dim hr As Integer
hr = Win32.CreateILockBytesOnHGlobal(IntPtr.Zero, True, lockbytes)
Do you know one? Please contribute it!