all groups > dotnet compact framework > february 2006 >
You're in the

dotnet compact framework

group:

Pinning Array



Pinning Array Miguel
2/28/2006 12:05:23 PM
dotnet compact framework: 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.
RE: Pinning Array Alex Yakhnin [MVP]
2/28/2006 1:31:31 PM
The Marshaler will probably copy and pin it as long as the native call lasts.
--
Alex Yakhnin, .NET CF MVP
www.intelliprog.com | www.opennetcf.org


[quoted text, click to view]
Re: Pinning Array Miguel
2/28/2006 2:09:46 PM
For avoiding any mistakes, I am referring to the .NET CF 1.0.
Re: Pinning Array Alex Feinman [MVP]
2/28/2006 4:52:49 PM
I concur. For synchronous calls Marshaller pins variables for the duration
of the call

[quoted text, click to view]
AddThis Social Bookmark Button