Problem with Pointer returned by MapViewOfFile

  • Thread starter Thread starter Jim Frazer
  • Start date Start date
J

Jim Frazer

Hi,

I'm pretty new to C#, but experienced with eVC++. We're in the process of
migrating from CE 3.00 to CE.Net 4.2. Our applications are in machine
control.

A server application manages process data and returns information to other
applications via an ActiveX control which communicates with the server
through a memory mapped file. I'm looking at converting the ActiveX control
to C#. I'm having a problem with how to handle the pointer to returned by
MapViewOfFile. In the original application I could cast the void pointer
returned by MapViewOfFile to a structure designed to fit the type of process
information that was placed in the memory mapped file. The structure being
used varies depending on the type of process data being returned. Can
someone point me in the right direction?

Thanks,

Jim
 
Return pointer as IntPtr and use Marshal.PtrToStructure to retrieve the data
from the unmanaged memory
 
Back
Top