最終更新:2017-12-19 (火) 14:43:36 (2318d)
プラットフォーム呼び出し/データ型
Top / プラットフォーム呼び出し / データ型
https://docs.microsoft.com/en-us/dotnet/framework/interop/marshaling-data-with-platform-invoke
Platform invoke data types
Unmanaged type in Wtypes.h Unmanaged C language type Managed class name Description HANDLE void* System.IntPtr 32 bits on 32-bit Windows operating systems, 64 bits on 64-bit Windows operating systems. BYTE unsigned char System.Byte? 8 bits SHORT? short System.Int16? 16 bits WORD unsigned short? System.UInt16 16 bits INT int System.Int32 32 bits UINT? unsigned int? System.UInt32? 32 bits LONG? long System.Int32 32 bits BOOL long System.Byte? 32 bits DWORD unsigned long? System.UInt32? 32 bits ULONG? unsigned long? System.UInt32? 32 bits CHAR char System.Char? Decorate with ANSI. WCHAR wchar_t System.Char? Decorate with Unicode. LPSTR char* System.String or System.Text.StringBuilder Decorate with ANSI. LPCSTR const char*? System.String or System.Text.StringBuilder Decorate with ANSI. LPWSTR wchar_t*? System.String or System.Text.StringBuilder Decorate with Unicode. LPCWSTR const wchar_t*? System.String or System.Text.StringBuilder Decorate with Unicode. FLOAT? float System.Single 32 bits DOUBLE? double System.Double 64 bits