System.Runtime.InteropServices.UnmanagedType Enum

public enum UnmanagedType

Base Types

Object
  ValueType
    Enum
      UnmanagedType

Assembly

mscorlib

Library

RuntimeInfrastructure

Summary

Identifies how parameters or fields are to be marshaled to unmanaged code.

See Also

System.Runtime.InteropServices Namespace

Members

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


UnmanagedType.Bool Field

Bool = 2;

Summary

Specifies a 4-byte Boolean value where true is denoted by all non-zero values and false is denoted by zero.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.ByValArray Field

ByValArray = 30;

Summary

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.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.CustomMarshaler Field

CustomMarshaler = 44;

Summary

Specifies the custom marshaler class when used with System.Runtime.InteropServices.MarshalAsAttribute.MarshalType or System.Runtime.InteropServices.MarshalAsAttribute.MarshalTypeRef .

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.FunctionPtr Field

FunctionPtr = 38;

Summary

Specifies a function pointer.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.I1 Field

I1 = 3;

Summary

Specifies a 1-byte signed integer.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.I2 Field

I2 = 5;

Summary

Specifies a 2-byte signed integer.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.I4 Field

I4 = 7;

Summary

Specifies a 4-byte signed integer.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.I8 Field

I8 = 9;

Summary

Specifies an 8-byte signed integer.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.LPArray Field

LPArray = 42;

Summary

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.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.LPStr Field

LPStr = 20;

Summary

Specifies a pointer to an ANSI character string.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.LPTStr Field

LPTStr = 22;

Summary

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.]

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.LPWStr Field

LPWStr = 21;

Summary

Specifies a pointer to a Unicode character string.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.R4 Field

R4 = 11;

Summary

Specifies a 4-byte floating-point number.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.R8 Field

R8 = 12;

Summary

Specifies an 8-byte floating-point number.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.Struct Field

Struct = 27;

Summary

A C-style structure, used to marshal managed formatted classes and value types.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.SysInt Field

SysInt = 31;

Summary

Specifies an implementation-sized signed integer.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.SysUInt Field

SysUInt = 32;

Summary

Specifies an implementation-sized unsigned integer.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.TBStr Field

TBStr = 36;

Summary

Specifies a pointer to the preferred BSTR representation for the current platform - Unicode or SBCS.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.U1 Field

U1 = 4;

Summary

Specifies a 1-byte unsigned integer.

[Note: System.Runtime.InteropServices.UnmanagedType.U1 can be used to marshal a Char parameter as an ANSI character.]

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.U2 Field

U2 = 6;

Summary

Specifies a 2-byte unsigned integer.

[Note: System.Runtime.InteropServices.UnmanagedType.U2 can be used to marshal a Char parameter as a Unicode character.]

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.U4 Field

U4 = 8;

Summary

Specifies a 4-byte unsigned integer.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.U8 Field

U8 = 10;

Summary

Specifies an 8-byte unsigned integer.

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace

UnmanagedType.value__ Field

value__;

See Also

System.Runtime.InteropServices.UnmanagedType Enum, System.Runtime.InteropServices Namespace