Hi all
I have a question about Intptr and how I can use it
I have a C++ code which do the following:
DWORD nBufferSize = 0;
BYTE *pBuffer = NULL;
hr =GetInfo(&nBufferSize, &pBuffer, NULL);
to use the function GetInfo in C# I have to pass the parameter pBuffer as Intptr, I don't know how to initiliaze it to act as a BYTE*?
The same problem I have with type HANDLE , e C++ code is as the follwoing
HANDLE *pSampleReadyEvents = NULL;
pSampleReadyEvents =
(HANDLE*)AllocateMemory(sizeof(HANDLE) * 100);
for (DWORD i = 0; i < 100; i++)
{
pSampleReadyEvents[i] = CreateEvent(NULL, FALSE, FALSE, NULL);
}
DWORD nWaitCode = WaitForMultipleObjects(nNumberOfSamples,
pSampleReadyEvents,
FALSE,
INFINITE);
IN C# the methods CreateEvent & WaitForMultipleObjects treat pSampleREadyEvents as Intptr, I also don't know how can I create it to work well?
by the way it is my first time to post question here,Thanks in advance