public enum UnmanagedType
Object
ValueType
Enum
UnmanagedType
mscorlib
RuntimeInfrastructure
Identifies how parameters or fields are to be marshaled to unmanaged code.
System.Runtime.InteropServices Namespace
UnmanagedType Fields
UnmanagedType.Bool Field
UnmanagedType.ByValArray Field
UnmanagedType.CustomMarshaler Field
UnmanagedType.FunctionPtr Field
UnmanagedType.I1 Field
UnmanagedType.I2 Field
UnmanagedType.I4 Field
UnmanagedType.I8 Field
UnmanagedType.LPArray Field
UnmanagedType.LPStr Field
UnmanagedType.LPTStr Field
UnmanagedType.LPWStr Field
UnmanagedType.R4 Field
UnmanagedType.R8 Field
UnmanagedType.Struct Field
UnmanagedType.SysInt Field
UnmanagedType.SysUInt Field
UnmanagedType.TBStr Field
UnmanagedType.U1 Field
UnmanagedType.U2 Field
UnmanagedType.U4 Field
UnmanagedType.U8 Field
UnmanagedType.value__ Field
Bool = 2;
Specifies a 4-byte Boolean value wheretrue
is denoted by all non-zero values andfalse
is denoted by zero.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
ByValArray = 30;
Specifies an array of fixed size. This unmanaged type is valid only for an array in a structure.When System.Runtime.InteropServices.MarshalAsAttribute.Value is set to
ByValArray
, the System.Runtime.InteropServices.MarshalAsAttribute.SizeConst field is required to contain the number of elements in the array.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
CustomMarshaler = 44;
Specifies the custom marshaler class when used with System.Runtime.InteropServices.MarshalAsAttribute.MarshalType or System.Runtime.InteropServices.MarshalAsAttribute.MarshalTypeRef .
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
FunctionPtr = 38;
Specifies a function pointer.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
I1 = 3;
Specifies a 1-byte signed integer.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
I2 = 5;
Specifies a 2-byte signed integer.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
I4 = 7;
Specifies a 4-byte signed integer.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
I8 = 9;
Specifies an 8-byte signed integer.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
LPArray = 42;
Specifies a C style array. When marshaling from managed to unmanaged, the length of the array is determined by the length of the managed array. When marshaling from unmanaged to managed, the length of the array is determined from the System.Runtime.InteropServices.MarshalAsAttribute.SizeConst and the System.Runtime.InteropServices.MarshalAsAttribute.SizeParamIndex fields.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
LPStr = 20;
Specifies a pointer to an ANSI character string.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
LPTStr = 22;
Specifies a pointer to the preferred character string representation for the current platform.[Note: A type library exported with an
LPTStr
on an ANSI platform will have a different size than one exported on a Unicode platform.]
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
LPWStr = 21;
Specifies a pointer to a Unicode character string.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
R4 = 11;
Specifies a 4-byte floating-point number.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
R8 = 12;
Specifies an 8-byte floating-point number.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
Struct = 27;
A C-style structure, used to marshal managed formatted classes and value types.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
SysInt = 31;
Specifies an implementation-sized signed integer.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
SysUInt = 32;
Specifies an implementation-sized unsigned integer.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
TBStr = 36;
Specifies a pointer to the preferred BSTR representation for the current platform - Unicode or SBCS.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
U1 = 4;
Specifies a 1-byte unsigned integer.[Note: System.Runtime.InteropServices.UnmanagedType.U1 can be used to marshal a Char parameter as an ANSI character.]
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
U2 = 6;
Specifies a 2-byte unsigned integer.[Note: System.Runtime.InteropServices.UnmanagedType.U2 can be used to marshal a Char parameter as a Unicode character.]
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
U4 = 8;
Specifies a 4-byte unsigned integer.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
U8 = 10;
Specifies an 8-byte unsigned integer.
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace
value__;
System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace