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.PtrToStructure (Int32, Type)

Marshals data from an unmanaged block of memory to a newly allocated object of the specified type.

[Visual Basic]
Overloads Public Shared Function PtrToStructure( _
   ByVal ptr As Integer, _
   ByVal structuretype As Type _
) As Object
[C#]
public static object PtrToStructure(
   int ptr,
   Type structuretype
);
[C++]
public: static Object* PtrToStructure(
   int ptr,
   Type* structuretype
);
[JScript]
public static function PtrToStructure(
   ptr : int,
   structuretype : Type
) : Object;

Parameters

ptr
A pointer to an unmanaged block of memory.
structuretype
A Type object representing the type of object to be created. This Type object must represent a formatted class.

Return Value

A managed object containing the data pointed to by ptr.

See Also

Marshal Class | Marshal Members | System.Runtime.InteropServices Namespace | Marshal.PtrToStructure Overload List