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.

Description

This type provides a set of values that identify the native types that are supported by the CLI. Each native type is encoded by a different value. All encoding values in the range 0-63, inclusive, are reserved for backward compatibility with existing implementations of the CLI. Values in the range 64-127 are reserved for future use in this and related Standards.

See Also

System.Runtime.InteropServices Namespace

Members

UnmanagedType Fields

UnmanagedType.Bool 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.LPWStr Field
UnmanagedType.R4 Field
UnmanagedType.R8 Field
UnmanagedType.SysInt Field
UnmanagedType.SysUInt 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.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 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.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.SysInt Field

SysInt = 31;

Summary

Specifies an implementation-specific sized signed integer.

See Also

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

UnmanagedType.SysUInt Field

SysUInt = 32;

Summary

Specifies an implementation-specific sized unsigned integer.

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