Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi all,
I wonder how I can access physical memory under Windows NT. I want to access to the BIOS informations; I have the start address (0xF0000000) and the end address (0xF000FFFF); my program works when compiled in 16 bits, but does not when compiled in 32 bits. Is there an API in Windows NT that allows to find the virtual address corresponding to the physical address?Thank you for your time.

There are function calls in C to access BIOS information. I may be wrong but different BIOS's will hold different data in different memory locations, so your app probably wont work with all PC's.
It is far easier to use the function calls then at least it has all been done for you.
I have just compiled and run an app ro check the bios info under winXP and it worked fine.
All of the functions are in BIOS.H
There are a few functions available, like biosequip() which returns an INT which can be used to see what hardware your machine has (EG number of parallel ports installed, if a game port is available or the number of disk drivs installed.Obviosly it was written some time ago for DOS but some things can still be used.
What exactly do you want to find in the BIOS?
Doing it this way is also safer that accessing the memory addresss directly.
Wizzard

Hi,
Thanks to Wizzard and to Ron (for his e-mail answer).
I finally managed to do what I wanted to by going to the http://www.sysinternals.com homepage. I found the 'physmem' source code that demonstrates how to map physical addresses into the process user memory. The source code is very clear and it refers to undocumented Windows APIs.
Ron, it demonstrates how to extract functions from DLLs too.
Wizzard, where can I find bios.h?
Vincent.

It comes with some C compilers.
I have Borland Turbo C++ 3, BIOS.h is included with that.I don't know where you will get TC (Turbo C++), but presumably there are other free compilers on the net which will have it.
What are you developing in?
Maybe BIOS.h could simply be included in another compiler, say Visual C++, I dont know, I havnt tried it. I actually compiled the code using TC running under WinXP.
If you like I will email you bios.h
Wizzard

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |