9 [Obsolete(
"An alternate API is available: Emit the MarshalAs custom attribute instead. http://go.microsoft.com/fwlink/?linkid=14202")]
17 internal int m_numElem;
121 m_unmanagedType = unmanagedType;
127 internal byte[] InternalGetBytes()
132 byte[] array =
new byte[num];
133 array[0] = (byte)m_unmanagedType;
134 array[1] = (byte)m_baseType;
140 int num3 = (m_numElem <= 127) ? 1 : ((m_numElem > 16383) ? 4 : 2);
142 byte[] array =
new byte[num3];
143 array[num2++] = (byte)m_unmanagedType;
144 if (m_numElem <= 127)
146 array[num2++] = (byte)(m_numElem & 0xFF);
148 else if (m_numElem <= 16383)
150 array[num2++] = (byte)((m_numElem >> 8) | 0x80);
151 array[num2++] = (byte)(m_numElem & 0xFF);
153 else if (m_numElem <= 536870911)
155 array[num2++] = (byte)((m_numElem >> 24) | 0xC0);
156 array[num2++] = (byte)((m_numElem >> 16) & 0xFF);
157 array[num2++] = (byte)((m_numElem >> 8) & 0xFF);
158 array[num2++] = (byte)(m_numElem & 0xFF);
164 (byte)m_unmanagedType
static UnmanagedMarshal DefineLPArray(UnmanagedType elemType)
Specifies an LPArray to marshal to unmanaged code. The length of an LPArray is determined at runtime ...
static UnmanagedMarshal DefineByValArray(int elemCount)
Specifies a fixed-length array (ByValArray) to marshal to unmanaged code.
UnmanagedType GetUnmanagedType
Indicates an unmanaged type. This property is read-only.
static UnmanagedMarshal DefineUnmanagedMarshal(UnmanagedType unmanagedType)
Specifies a given type that is to be marshaled to unmanaged code.
Guid IIDGuid
Gets a GUID. This property is read-only.
SecurityAction
Specifies the security actions that can be performed using declarative security.
Provides information about, and means to manipulate, the current environment and platform....
Represents a globally unique identifier (GUID).To browse the .NET Framework source code for this type...
static UnmanagedMarshal DefineSafeArray(UnmanagedType elemType)
Specifies a SafeArray to marshal to unmanaged code.
int ElementCount
Gets a number element. This property is read-only.
static UnmanagedMarshal DefineByValTStr(int elemCount)
Specifies a string in a fixed array buffer (ByValTStr) to marshal to unmanaged code.
UnmanagedType
Identifies how to marshal parameters or fields to unmanaged code.
The exception that is thrown when one of the arguments provided to a method is not valid.
Represents the class that describes how to marshal a field from managed to unmanaged code....
Specifies that the class can be serialized.
static readonly Guid Empty
A read-only instance of the T:System.Guid structure whose value is all zeros.
UnmanagedType BaseType
Gets an unmanaged base type. This property is read-only.