473,326 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Accessing System Memory through C#

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?
Nov 15 '05 #1
1 1666

"Ronald de Feijter" <an*******@discussions.microsoft.com> wrote in message
news:0a****************************@phx.gbl...
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
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: lupher cypher | last post by:
Hi, I'm trying to access memory directly at 0xb800 (text screen). I tried this: char far* screen = (char far*)0xb8000000; but apparently c++ compiler doesn't know "far" (says "syntax error...
8
by: nkrisraj | last post by:
Hi, I have a following structure: typedef struct { RateData rdr; int RateID; char RateBalance; } RateInfo;
10
by: joint52 | last post by:
Hello This seems to work in my system, until variable 'i' reaches 15985, then the program crashes. My question is, why won't it crash sooner? How does it work? And why am I able to set the...
1
by: Frustrated | last post by:
Since C# and VB.NET are similar, I am posting this here also I have a C++ DLL that I need to access from VB.NET or C#. The following is my attempt via VB.NET. The function I am trying to call...
5
by: pt | last post by:
Hi, i am wonderng what is faster according to accessing speed to read these data structure from the disk in c/c++ including alignment handling if we access it on little endian system 32 bits...
38
by: djhulme | last post by:
Hi, I'm using GCC. Please could you tell me, what is the maximum number of array elements that I can create in C, i.e. char* anArray = (char*) calloc( ??MAX?? , sizeof(char) ) ; I've...
20
by: sethukr | last post by:
hi, i need to store a value to a particular memory location without having a variable. So, how can i access a 'memory address' without using variables?? Is it possible in C??? Plz, help...
6
by: Sid | last post by:
All, See the below piece of C code snippet typedef struct _a { int ia; int ja; }A;
3
by: FerrisUML | last post by:
Im writing a small web application and what I'd like to do is open a file, read the contents into memory and then close the file as fast as I can to free up the file for the next user. Once the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.