Results 1 to 5 of 5

Thread: using dll for input output, but error!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Location
    Netherlands
    Posts
    115

    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.
    ICQ :137108715
    MSN Messenger : [email protected]

  2. #2
    Addicted Member GSIV's Avatar
    Join Date
    Jun 2002
    Location
    Texas, USA
    Posts
    213
    What dll are you using? And how are you using it?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Location
    Netherlands
    Posts
    115
    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:
    ICQ :137108715
    MSN Messenger : [email protected]

  4. #4
    Addicted Member GSIV's Avatar
    Join Date
    Jun 2002
    Location
    Texas, USA
    Posts
    213
    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.

  5. #5
    Ergo60
    Guest
    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
  •  



Click Here to Expand Forum to Full Width