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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top