Solved

Breaking through HAL

Posted on 1998-04-08
5
257 Views
Last Modified: 2010-04-10
I need to store various structures at specific addresses on and Windows NT machine.  Unfortunately Windows NT had a Hardware Abstraction Layer (HAL) which seems to prevent me from doing this.  Is there a way to break through HAL or at least get around it so that I can do this?  I need help fast
0
Comment
Question by:jerm
  • 3
5 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 1184119
What do you mean by "store various sturcutres at specific addresses"?  Windows 95 and NT use virtual memory.  You cannot have dirrect access to physical memory. But you should not need dirrect access to physical memory.  Why do you want to do this?
0
 

Author Comment

by:jerm
ID: 1184120
Actually I am reusing old code which uses direct IO (access to physical memory) to share data between two computers running real time applications.  I understand that Win95 and NT do not like this, but was hoping to be able to use the old code without many changes.

Is this possible
0
 
LVL 22

Accepted Solution

by:
nietod earned 50 total points
ID: 1184121
No.  

But with some work you can make it work.  Try using a memory mapped file instead.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1184122
Use the CreateFileMapping() API.  You will probably want to use a "named" mapping so the two programs can use the same mapping.  (The other option is to pass a handle from one program to the other, but this usually requires that the one program starts the other running.  I don't know if that's the case you have.)  

I hope this help gets you started.  Ask if you have any questions.
0
 
LVL 4

Expert Comment

by:piano_boxer
ID: 1184123
One simple answer:
You need to write a device driver.
Its not that hard, try looking at the samples from the Win32 device driver kit.

0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question