delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/09/29/06:30:12

From: "H.Shiozaki" <hshiozaki AT nifty DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: IO_Port Access in DJGPP + Windows 2000 + GIVEIO.SYS
Date: Sun, 29 Sep 2002 19:21:08 +0900
Organization: @nifty netnews service
Lines: 34
Message-ID: <3D96D414.6010609@nifty.com>
NNTP-Posting-Host: nttkyo026218.tkyo.nt.isdn.ppp.infoweb.ne.jp
Mime-Version: 1.0
X-Trace: news522.nifty.com 1033294690 15299 61.121.10.218 (29 Sep 2002 10:18:10 GMT)
X-Complaints-To: -
NNTP-Posting-Date: Sun, 29 Sep 2002 10:18:10 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: ja, en-us
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Please Help me.
--------------
I found and install GIVEIO.SYS in my Win_2k PC.
And there is a sample "testio.c" with GIVEIO.SYS.
I compile it using "cygwin", and work it fine.
 #include <windows.h> is need to use giveio.sys,
But "cygwin" do not support hardware Interrupt.
I wont to make a program that need
1) do Direct IO and 2) Hardware Interrupt
But in DJGPP, there is not windows.h
below is a some part of testio.c
-------------
include <stdio.h>
#include <math.h>
#include <conio.h>
#include <windows.h>
int main()
{
    HANDLE h;
    h = CreateFile("\\\\.\\giveio", GENERIC_READ, 0, NULL,
        OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
    if(h == INVALID_HANDLE_VALUE) {
        printf("Couldn't access giveio device\n");
        return -1;
    }
	CloseHandle(h);
    // io operation can do in Win_2k.
}
--------------
Please someone help me, how to solve.
Regard.
H.Shiozaki


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019