Marshal Methods


.NET Framework Class Library
Marshal..::.AllocHGlobal Method

Allocates a block of memory using LocalAlloc.

Overload List

  NameDescription
Public methodStatic memberSupported by the .NET Compact FrameworkAllocHGlobal(Int32)Allocates memory from the unmanaged memory of the process.
Public methodStatic memberAllocHGlobal(IntPtr)Allocates memory from the process's unmanaged memory.
Top
See Also

Reference

Tags :


Community Content

Thomas Lee
Marshalling: Using native DLLs in .NET

Please read the following article:
http://blog.rednael.com/2008/08/29/MarshallingUsingNativeDLLsInNET.aspx


It's an in-depth article about how to use a native DLL (or C++ DLL) in your managed .Net code. The article shows which types are interoperable, how to import a DLL, how to pass strings, how to pass structures and how to de-reference pointers.


And C# source code examples are included.


Page view tracker