[問題] wioio 在non-administrator下執行

作者: drunknmunky   2016-01-20 01:03:01
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
VS2013
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
winio
可在下列網址下載:
http://www.internals.com/
問題(Question):
正常使用WINIO需要有administrator權限
但其HELP有提到如何在"非使用者權限"下使用
大致就是先在administrator下呼叫 InstallWinIoDriver->
重開機->登入一般使用者帳號->開開心心使用winio...
我想法很單純
所以我寫了個程式只呼叫 InstallWinIoDriver() 讓其在admin下執行(檢查return是TRUE)
但重開機後登入regular user帳號, 想要直接使用WINIO內提供API卻都失敗?
如:GetPortVal(), SetPortVal() 等...
餵入的資料(Input):
Return = GetPortVal(PortAddr, &PortVal);
預期的正確結果(Expected Output):
Return 應該是True, 且能正確得到PortValue
錯誤結果(Wrong Output):
Return 是False, 且獲得的PortVal與使用TOOL讀出的值不一致
程式碼(Code):(請善用置底文網頁, 記得排版)
程式碼不在身邊 暫略
補充說明(Supplement):
補上HELP內所說內容
Using WinIo from a non-administrative account
WinIo can be used by regular users (non-administrators). In order to support
this configuration, the WinIo driver (WinIo32.sys or WinIo64.sys) must be
first installed on the system from an administrative account using
InstallWinIoDriver. Following installation, the driver will load
automatically whenever Windows starts. An application will then be able to
use the library's functions to access I/O ports and physical memory.
You should take the following steps in order to use WinIo from a
non-administrative account:
1. Place the distributable files in the directory where your application
resides.
2. Call InstallWinIoDriver from a process that has administrative privileges
with the first parameter set to the path of the driver file (e.g.
c:\myapp\WinIo32.sys).
3. Reboot the system.
4. Log on as a regular user.
5. You should now be able to use WinIo in the same way as when using the library
from an administrative account.
6. When WinIo is no longer required, call RemoveWinIoDriver to remove the WinIo
driver from the system. This must be performed from an administrative
account.
作者: stupid0319 (徵女友)   2016-01-20 08:28:00
Install driver後看一下系統服務有沒有出現winIO?
作者: drunknmunky   2016-01-20 10:06:00
你是指regedit內嗎? 有喔

Links booklink

Contact Us: admin [ a t ] ucptt.com