|
-
Jul 8th, 2002, 06:32 AM
#1
Thread Starter
Lively Member
using dll for input output, but error!
I am using a dll file for input and output to the pc printer port. but when I use a function from that dll, I get the error, Privilleged instruction. why?
I am using win XP professional.
-
Jul 8th, 2002, 07:35 AM
#2
Addicted Member
What dll are you using? And how are you using it?
-
Jul 8th, 2002, 10:54 PM
#3
Thread Starter
Lively Member
I use it like this:
Code:
Declare Sub OUTPORT Lib "Port" (ByVal A%, ByVal b%)
Declare Function INPORT Lib "Port" (ByVal p%) As Integer
and this is the dll:
-
Jul 9th, 2002, 07:28 AM
#4
Addicted Member
There's no documentation in the zip file about the .dll. My guess based on the date of the file, 9/2/99, is that it is not compatible with the later versions of windows. e.g., NT/2000/XP. Try the following link. At least you can get some documentation and a good example of how it works for a specific OS.
http://www.lvr.com/parport.htm#Programming
Hope it helps. Good luck.
-
Jul 9th, 2002, 08:48 AM
#5
It likely that the DLL was written for Windows 95/98. There used to be functions in C that would allow direct access to any hardware port number. I know, because I wrote a similar DLL for access to the parallel port. But with windows NT,2K, ans XP, you can no longer gain direct access to the hardware prots without a driver. Can we all say "Hardware abstraction layer?" I think this really, really sucks, but what can we do but follow along. There is a program out there called Tiny Port that we are using here that works pretty well.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|