NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Marshal.AllocHGlobal

Allocates memory from the process' unmanaged, native, heap.

[Visual Basic]
Public Shared Function AllocHGlobal( _
   ByVal cb As Integer _
) As Integer
[C#]
public static int AllocHGlobal(
   int cb
);
[C++]
public: static int AllocHGlobal(
   int cb
);
[JScript]
public static function AllocHGlobal(
   cb : int
) : int;

Parameters

cb
Number of bytes of memory required.

Return Value

A pointer to the newly allocated memory. Treat this as a void* and cast as appropriate.

Exceptions

Exception Type Condition
System.Runtime.InteropServices.OutOfMemoryException if there is insufficient memory to satisfy the request.

See Also

Marshal Class | Marshal Members | System.Runtime.InteropServices Namespace