Could someone please help me to convert this IDL interface to a c#
interface. The thing Im having problems with is to convert the
different parameter types..
interface IComponentAuthenticate : IUnknown
{
HRESULT SACAuth([in] DWORD dwProtocolID,
[in] DWORD dwPass,
[in, size_is(dwDataInLen)] BYTE *pbDataIn,
[in] DWORD dwDataInLen,
[out, size_is(, *pdwDataOutLen)] BYTE **ppbDataOut,
[out] DWORD *pdwDataOutLen);
}
Thanks,
PM
Mattias Sjögren - 13 Jun 2005 21:20 GMT
>Could someone please help me to convert this IDL interface to a c#
>interface. The thing Im having problems with is to convert the
[quoted text clipped - 11 lines]
>
>}
Try this:
[Guid(...)]
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
interface IComponentAuthenticate
{
void SACAuth(uint dwProtocolID, uint dwPass,
[MarshalAs(UnmangedType.LPArray)] byte[] pbDataIn, uint dwDataInLen,
out IntPtr ppbDataOut, out uintpdwDataOutLen);
}
or if you prefer to recieve pdwDataOutLen as the return value
uint SACAuth(..., out IntPtr ppbDataOut);
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.