Accessing System Memory through C#

  • Thread starter Thread starter Ronald de Feijter
  • Start date Start date
R

Ronald de Feijter

In a mechatronic system I can control some motors and
servos by setting values between 0 and 255 at specific
memory addresses. My problem is how to access these memory
addresses within C#. I know I can access memory locations
by using pointers in unsafe code. But I only know how to
assign a pointer to the address of a declared variable (by
using the & operator), not to a specific address.

Does anybody have a suggestion?
 
Ronald de Feijter said:
In a mechatronic system I can control some motors and
servos by setting values between 0 and 255 at specific
memory addresses. My problem is how to access these memory
addresses within C#. I know I can access memory locations
by using pointers in unsafe code. But I only know how to
assign a pointer to the address of a declared variable (by
using the & operator), not to a specific address.

Does anybody have a suggestion?

You will need a device driver to perform the actual io to the motor/servo
device. Your c# app will then communicate through the driver's defined api.
Addresses in usermode (where c# apps live) cannot access physical memory
directly.

bob
 
Back
Top