Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Error: Acess Violation.... Reading address 0x408

Posted on 1998-11-27
Medium Priority
Last Modified: 2012-05-04
I need to read the address 0x00000408 for the port address of LPT1. Everytime I try to access that memory in Win95 using pointer, the error prompt out and crashed my system.

How can I access the memory that does not belong to my program?

Question by:skidz
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +3
LVL 16

Expert Comment

ID: 1254689
post the code that crashes your system
LVL 86

Expert Comment

ID: 1254690
heyhey - no source code necessary ;-)

You simply CANNOT read (or write) from (to) physical memory addresses under Win32, unless you don't do it in a VXD ...
LVL 16

Expert Comment

ID: 1254691
what about old DOS programs ? also, as far as i remember, some guy succeeded to clear the interrupt table (on WIn95 - it does not works on WInNT) - (ok i may be wrong ;-)

probably "crashed my system" means just classic GPF or ??

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

LVL 86

Expert Comment

ID: 1254692
Well, i wouldn't rely on this... and even if it works, how should he pass the result to a Win32 app?

Author Comment

ID: 1254693
So??? Anyone have the idea to read address 0x408 in Win95?

LVL 14

Expert Comment

ID: 1254694
As JKR write, you can't make in in Windows95 and must write
VXD driver (see Windows Doc or

Expert Comment

ID: 1254695

use the following VXD-Driver (shareware) to direct-access physical memory from Windows  NT / Windows 95/98, etc.

TVicHW32 3.00

You find it at

I've tried it already and it works


Author Comment

ID: 1254696
I'm writing a software that need to access the memory address. Anyone cangive me the code to access that memory? I don't want any shareware/freeware product.
LVL 16

Expert Comment

ID: 1254697
1.) what languale / library you use ?
2.) do you really need access to memory or just the status of LPT1 ?
3.) explain better your problem ? probably post the code that doesn't work for you ...

Expert Comment

ID: 1254698
> How can I access the memory that does not belong to my program?

In a Windows 95 application, you can't. Period. And even if you could read that memory location and get the port address you couldn't do anything use with the port either.

Please step back and tell us what you're trying to accomplish. There is probably another way.

Author Comment

ID: 1254699
I would like to setup an auto configuration for my LPT port. B'coz the base address of the LPT1 is at 0x408. So ... I just wanna read the memory... please help.


Accepted Solution

plsbctv earned 200 total points
ID: 1254700
I'm having to make some guesses here. You're writing a WIN32 application that wants to print to a default printer. You can't read the BIOS memory location that contains the BIOS printer port address because of memory protection. Even if you had this address, you couldn't use it from an application.

Let's call this an answer. Depending on what you want to do, your answer is one of these things.

1. If you want to print a document, you use Windows GDI functions along with the StartDoc API function. The documentation for this can be found at and the following pages. This assumes your printer has an appropriate WIndows driver installed.

2. If you want to talk to the printer directly, use the Windows API function ReadPrinter and WritePrinter. This documentation is at and following. Again, this assumes your printer has a driver installed. There's more information in Microsoft Knowledge Base article Q196805.

3. If you want to use the printer port to talk to a device that isn't a printer and there is no print driver installed for that port, then you can talk to the port by using the Windows API function

   handle = CreateFile(
      "\\\\.\\LPT1",     // address of name of the communications device
      fdwAccess,          // access (read-write) mode
      0,                  // share mode
      NULL,               // address of security descriptor
      OPEN_EXISTING,      // how to create
      0,                  // file attributes
      NULL                // handle of file with attributes to copy   );

The use handle with ReadFIle and WriteFile calls. Any good WIndows programming book will have this information.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

722 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