example : given in the include file
DLLEXPORT BSTR WINAPI I2cGetInterfaceTypeStr (BSTR Interface);
how do i access this function in vc#. This doesn't work.
[DllImport("I2CAPI32.dll")] public static extern string I2cGetInterfaceTypeStr (string Interface);
Other functions of the DLL which don't use BSTR are working ok.
Can anyone help me.
Thanks, Jan

BSTR type in c#
Ftan
Khadragy
http://msdn.microsoft.com/library/default.asp url=/library/en-us/csref/html/vcwlkCOMInteropPart1CClientTutorial.asp
This might help you a little further on finding how to use what your are trying to do :)
Martin Bussieres
[DllImport("I2CAPI32.dll", CharSet=CharSet.Unicode)]
[return: MarshalAs(UnmanagedType.BStr)]
public static extern string I2cGetInterfaceTypeStr([MarshalAs(UnmanagedType.BStr)] string Interface);