阅读:867回复:0
vtoosld使用问题
用vtoolsd定义小端口驱动程序,
提示:clMS4D.lib(vdevice.obj) : error LNK2001: unresolved external symbol __DestroyDevice 我是这么定义的, #define Declare_Virtual_Device_Ex(devName, RefData) extern \"C\" VDevice* \\ __cdecl _CreateDevice(); \\ extern \"C\" VOID __stdcall v86_api_entry(); \\ extern \"C\" VOID __stdcall pm_api_entry(); \\ extern \"C\" VOID __stdcall localControlDispatcher(); \\ extern \"C\" DDB The_DDB; \\ extern \"C\" void (*VXD_SERVICE_TABLE[])(); \\ DDB The_DDB = { \\ 0, \\ DDK_VERSION, \\ devName##_DeviceID, \\ devName##_Major, \\ devName##_Minor, \\ 0, \\ {\' \',\' \',\' \',\' \',\' \',\' \',\' \',\' \'}, \\ devName##_Init_Order, \\ (PGPUInt32)localControlDispatcher, \\ (PGPUInt32)v86_api_entry, \\ (PGPUInt32)pm_api_entry, \\ 0,0,RefData, \\ (PGPUInt32)VXD_SERVICE_TABLE, \\ 0, \\ 0, \\ __SIG__, \\ }; \\ VDevice* __cdecl _CreateDevice() \\ { \\ return (VDevice*)new DEVICE_CLASS; \\ } // Declare_Port_Driver defines many important system-required fields for the // driver. #define Declare_Port_Driver(VName, _lgn, _asc, _rev, _fc, _ifr, _bt, _rd) \\ VOID __cdecl VName##_Aer(AEP*); \\ ILB VName##_Ilb; \\ DRP VName##_Drp={ \\ {\'X\',\'X\',\'X\',\'X\',\'X\',\'X\',\'X\',\'X\'}, \\ _lgn, \\ Driver->VName##_Aer, \\ &VName##_Ilb, \\ _asc, \\ _rev, \\ _fc, \\ _ifr, \\ _bt, \\ 0, \\ _rd}; \\ Declare_Virtual_Device_Ex(VName, (PGPUInt32)&VName##_Drp) 然后Declare_Port_Driver(PGPDISK, DRP_MISC_PD, PGPDISK_NAME, PGPDISK_REV, PGPDISK_FEATURE, PGPDISK_IFR, DRP_BT_ESDI, 0) 怀疑是这里出了问题,大侠哪个用过? |
|