Thread: problems with giveio in win2k

  1. #1
    Registered User
    Join Date
    Nov 2004

    Question problems with giveio in win2k

    Hi all,

    I am trying to access ports via the giveio.sys driver but I can't even open it.
    In Visual C++ I built a normal Dos Box application and the routine ran fine but when I use the same stuff in my DLL, it just won't work. The CreateFile() always returns an invalid handle value:

    h = CreateFile("\\\\.\\giveio", GENERIC_READ, 0, NULL,
    if (h == INVALID_HANDLE_VALUE) {
    MessageBox(0,"Couldn't access giveio device","Error",MB_ICONHAND);

    Can anybody give me a hint why this happens, why it does not work in my DLL?

    Thanks a lot!
    Last edited by mccoz; 11-10-2004 at 05:17 AM.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    What does GetLastError() return?


  3. #3
    Registered User
    Join Date
    Nov 2004
    Thanks for the hint, it returns:
    2 The system cannot find the file specified. ERROR_FILE_NOT_FOUND
    But why does the exact same code work within the dos box application? How do I have to specify the file location in the DLL?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. No clue how to make a code to solve problems!
    By ctnzn in forum C Programming
    Replies: 8
    Last Post: 10-16-2008, 02:59 AM
  2. String Manipulation problems -_-
    By Astra in forum C Programming
    Replies: 5
    Last Post: 12-13-2006, 05:48 PM
  3. Rendering problems (DirectX?)
    By OnionKnight in forum Tech Board
    Replies: 0
    Last Post: 08-17-2006, 12:17 PM
  4. contest problems on my site
    By DavidP in forum Contests Board
    Replies: 4
    Last Post: 01-10-2004, 09:19 PM
  5. Having Problems with Win2k and Softice
    By XenoCodex Admin in forum A Brief History of
    Replies: 4
    Last Post: 07-01-2002, 02:14 PM