Hi Urs!
> 1. Is Marshal::AllocHGlobal(IntPtr) always pinned memory?
> 2. Is Marshal::AllocHGlobal(int) moveable or pinned memory?
Neither has something to do with garbage-collection and therefor
"pinned" makes no sence...
The returned IntPtr always points to a unmanaged memory region!
See: Marshal.AllocHGlobal
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemruntimeinteropserv
icesmarshalclassallochglobaltopic1.asp
and
See: GlobalAlloc
http://msdn.microsoft.com/library/en-us/memory/base/globalalloc.asp

Signature
Greetings
Jochen
My blog about Win32 and .NET
http://blog.kalmbachnet.de/