Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memory Access

Status
Not open for further replies.

Moissenjeff

Programmer
Mar 18, 2008
6
NO
Hi all

Here is my problem:

I need to write a program that reads data from the Com Port (USB) and make the data that is read accessible to another application via RAM, I could use a normal file, but that is to slow, and this requires realtime streaming.

I suspect that it requires a pointer of some sort, but I have no idea how to create a pointer that is visible for all other applications.

I will also need to make a test application that reads the data from memory to validate that it works properly

Please answer in C#, C++ or C
 
You can either pass an instance of your class or provide a service.

I would be tempted to provide a service much like a GPS Antenna that just spews out the data or provides classes with change notification. The observer pattern does very well in this instance.

 
That does not help me. I do not know how to code it :)

Services, processes and the like is actually a bit above my head
 
You cannot use the Microsoft .NET Framework classes to directly access other types of ports, such as parallel ports or USB ports.

Any variable you declare is "in memory" so that answers that. I guess you would need to use c++ and the ddk to achieve this. Basically you would need to write your own driver. This is quite heavy and not really suitable for a C# forum. I would try reposting in the C++ forum.



 
Not really covering the whole, "You cannot use the Microsoft .NET Framework classes to directly access other types of ports, such as parallel ports or USB ports." problem for me I'm afraid. Nice link on sharing data between apps though.

This is still a ddk issue methinks.

Charlie Benger-Stevenson
Hart Hill IT Ltd
 
I think MS provides a ddk that is easier to use than a C++ ddk. Normally in C++ it's the equivalent of writing to a file or any data stream. I am under the impression that MS provides a class based DDK that wrap ports much like the SerialPort class for USB.

I'd be tempted to say .Net Native.

 
Thanx guys for your answers

I did however discover that the CAN converter dongle comes with a library file (dll) to enable read access to the stream coming through the USB port, but services/processes is still relevant to the task at hand so I thank you for getting me on the right track

Laters
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top