[問題] 使用wdk8/8.1內定義函式錯誤

看板C_and_CPP (C/C++)作者時間10年前 (2015/12/08 15:20), 10年前編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) vs2013 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) 下載wdk8/8.1 使用裡面的wdm.h #Include <wdm.h> (Include path: c:\program files(x86)\Windows Kits\8.0\Include\km ) 問題(Question): 想要寫個console application, 呼叫wdm.h下的function 但只要include wdm.h 就會出現error 餵入的資料(Input):預期的正確結果(Expected Output): 應該至少能正確compile 錯誤結果(Wrong Output): Error C1189: #error: "No Target Architecture" File Ntdef.h IntelliSense: identifier "InterlockedExchangePointer" is undefined File wdm.h IntelliSense: identifier "PAGE_SHIFT" is undefined File wdm.h IntelliSense: identifier "PFN_NUMBER" is undefined File wdm.h IntelliSense: "TIME_FIELDS" is undefined File wdm.h 程式碼(Code):(請善用置底文網頁, 記得排版) #include "stdafx .h #include <wdm.h> int _tmain(int argc, _TCHAR* argv []) { return 0; } 補充說明(Supplement): 第一次使用wdm.h 因為需用到裡面 kernel mode 的函式 想不到連include都有問題 希望有經驗強者釋疑 感謝 手機排版若造成難閱讀或需更多資訊 敬請告知 回家再用桌機重新編排 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.73.87.223 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1449559201.A.12D.html

12/08 18:33, , 1F
wdm.h下的含式,可以在ring3隨便呼叫的嗎?
12/08 18:33, 1F
意思是不能用嗎? 可以說清楚些嗎? 因為是第一次碰到 或者該如何使用? ※ 編輯: drunknmunky (122.116.220.132), 12/09/2015 01:29:10

12/10 17:29, , 2F
不能用。你想用什麼?
12/10 17:29, 2F
文章代碼(AID): #1MPeIX4j (C_and_CPP)
文章代碼(AID): #1MPeIX4j (C_and_CPP)