有關WinIO的使用. |
尚未結案
|
syj13579
一般會員 發表:2 回覆:2 積分:0 註冊:2005-01-29 發送簡訊給我 |
各位先進:
可否解釋如何使用WinIO,如以下STEP的操作,我看不懂.
Using WinIo in a C Builder application
In order to use WinIo in a C Builder application, you should take the following steps:
1.Place winio.dll, winio.vxd and winio.sys in the directory where your application's executable file resides.
2.Create a winio.lib file by running the IMPLIB utility that is bundled with C Builder.
3.Add the generated winio.lib to your project file.
4.Remove the WINIO_API constant from the function declarations in winio.h.
5.Add the "#include "winio.h" statement to your source file.
Call InitializeWinIo.
6.Call the library's functions to access I/O ports and physical memory.
7.Call ShutdownWinIo.
|
blk5743
高階會員 發表:34 回覆:371 積分:236 註冊:2003-11-17 發送簡訊給我 |
|
syj13579
一般會員 發表:2 回覆:2 積分:0 註冊:2005-01-29 發送簡訊給我 |
我想我的問題是,就是對WinIO的使用.我下載了一個Sourse Code如下:
這是之前別人Post 的Code有關用WinIO讀取硬體資訊,整個程式可以執行.我拿下來改可以順利的執行,並且用Parallel port monitor可看到我Parallel port的變化.但是問題是這是重別人的code去改的,於是我想重頭宣告起,就能使用....該如何做?於是才會winio的使用步驟!因為實在看不懂. #include
|
blk5743
高階會員 發表:34 回覆:371 積分:236 註冊:2003-11-17 發送簡訊給我 |
1.Place winio.dll, winio.vxd and winio.sys in the directory where your application's executable file resides.
將上述的檔案跟你的執行檔放同一個目錄下,以便執行時呼叫
2.Create a winio.lib file by running the IMPLIB utility that is bundled with C Builder.
原本的winio.lib可能是VC做出來的,為了要讓BCB能夠使用,所以需用IMPLIB先轉檔
3.Add the generated winio.lib to your project file.
將轉換後的winio.lib加入你的project
4.Remove the WINIO_API constant from the function declarations in winio.h.
到winio.h中將WINIO_API的宣告移除
5.Add the "#include "winio.h" statement to your source file.
#include "winio.h"
Call InitializeWinIo.
在你開始在做I/O前先呼叫InitializeWinIo。建議放在TForm1::TForm1以便一開始就呼叫
且只做一次
6.Call the library's functions to access I/O ports and physical memory.
像以前在DOS一樣,直接對某一個I/O Port作讀寫
7.Call ShutdownWinIo.
結束後,呼叫ShutdownWinIo。建議放在TForm1::~TForm1以便結束時自動呼叫
|
zolt
一般會員 發表:20 回覆:9 積分:5 註冊:2008-07-19 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |