Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Home » Tip Bank » C++
Language: C++
Expertise: Beginner
Jun 29, 1999



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Memory Protection

I'm writing a program in Windows 95. I try to READ memory address FFFF:0005 that contain BIOS date, by using peekb(int, int) function, but Windows displays a close message. How can I read the contents of this address?

Sorry but the simple answer is that you should not. The whole point of a 32-bit proteced mode operating system is that applications cannot write to any address they like. Doing this would allow one program to corrupt another, which violates one of the prime goals of the operating system. I realize you only want to read that address but it is not set up that way. It is possible under Windows 95 to access a real-mode address but it is designed to happen only in device drivers. Unless you want to write a device driver, I would look for another way to do what you want. The Windows API is pretty rich and you might find some system calls that will give you what you need.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date