Pages

Thursday, 10 March 2011

COM Data Types

Data type conversions from COM to .Net
























IDL Type.NET Type
charSystem.SByte
shortSystem.Int16
int, long, HRESULT and SCODESystem.Int32
int64System.Int64
unsigned charSystem.Byte
unsigned shortSystem.UInt16
unsigned int and unsigned longSystem.UInt32
uint64System.UInt64
floatSystem.Single
doubleSystem.Double
BSTR, LPSTR and LPWSTRSystem.String
VARIANT_BOOLSystem.Boolean
DATESystem.DateTime
GUIDSystem.Guid
DECIMALSystem.Decimal
CURRENCYSystem.Decimal
VARIANTSystem.Object
IUnknown*System.Object
IDispatch*System.Object
void*System.IntPtr
IDispatchEx*System.Runtime.InteropServices.Expando.IExpando
IEnumVariant*System.Collections.IEnumerator










COMIDL
boolean and smallchar
wchar_tunsigned short
hyper and __int64int64
[string] char*LPSTR
[string] wchar_t*LPWSTR
byteunsigned char
unsigned hyper and unsigned __int64uint64

No comments: