Pinning Array

  • Thread starter Thread starter Miguel
  • Start date Start date
M

Miguel

When invoking the WaitForMultipleObjects function, should the second
parameter, which is een array, be pinned? I believe this should be the
case, since the CLR could move the array on the managed heap. However,
I have never experienced problems when not doing it.
Any ideas?

DWORD WaitForMultipleObjects(
DWORD nCount,
CONST HANDLE* lpHandles,
BOOL fWaitAll,
DWORD dwMilliseconds
);


In .NET I would use an array of integers or IntPtr.
 
I concur. For synchronous calls Marshaller pins variables for the duration
of the call
 
Back
Top