fixed IntPtr

  • Thread starter Thread starter vipin aravind
  • Start date Start date
V

vipin aravind

Hi,
In C#, I do DllImport of MapViewOfFile(...) which will return
IntPtr. The (void *) operator gives me the pointer way of working on
the memory. My question is do I need to use

fixed(void *ptr = (void *)intptr)
{


}

to pin down the memory.

thank you
vipin
 
No, you shouldn't have to because the memory being pointed to is not CLR
managed.

Richard
 
Back
Top