阅读:2190回复:5
还是那个问题,再解决不了就要被辞啦。。。用nmake命令持编译网卡驱动程序,98DDK头文件 basedef.h 93行117行总是报C2011的错误! 谁有思路呀?我不能去改98DDK头文件呀? |
|
沙发#
发布于:2001-09-10 10:40
在程序头加上
#define MIDL_PASS // suppress 32-bit only 我不知道能否好使,也不知道原因。 把你的头文件都列出来,才能分析原因。 |
|
|
板凳#
发布于:2001-09-10 10:55
加入之后,没有成功.又多了两个C2011错误。 #ifndef _TPIWRAPS_H #define _TPIWRAPS_H #ifdef _VXD_ //#define WANTVXDWRAPS #pragma warning (disable:4005) // disable macro redefinition warning #pragma warning (disable:4142) // disable benign type redefinition warning #include "d:\prism\prismddk\tools\98ddk\inc\win98\basedef.h" #pragma warning (default:4005) // restore macro redefinition warning #pragma warning (default:4142) // restore benign type redefinition warning #include "d:\prism\prismddk\tools\98ddk\inc\win98\vmm.h" #ifndef _WFW_ #include "d:\prism\prismddk\tools\98ddk\inc\win98\vxdldr.h" #else #define VXDINLINE static __inline #define Touch_Register(reg) __asm or reg, reg; #define VMMCall(s) VxDCall(s) #define PAGEMAPGLOBAL 0x40000000 #endif #ifdef WANTVXDWRAPS #include "d:\prism\prismddk\tools\98ddk\inc\win98\vxdwraps.h" #else # define VMM_MAP_PHYS_TO_LINEAR_INVALID 0xFFFFFFFF #endif #ifndef _WFW_ #include "d:\prism\prismddk\tools\98ddk\inc\win98\vpicd.h" #include "d:\prism\prismddk\tools\98ddk\inc\win98\vwin32.h" #endif #include <winerror.h> PVOID _stdcall PeLdrLoadDevice(PCHAR DeviceName); ULONG _stdcall PeLdrUnLoadDevice(PVOID DeviceHandle,PCHAR DeviceName); PVOID _stdcall MemPageLock(ULONG lpMem, ULONG cbSize); VOID _stdcall MemPageUnlock(ULONG lpMem, ULONG cbSize); ULONG _stdcall AllocateIRQ(ULONG dwRef, ULONG dwIRQ, ULONG dwHandler); VOID _stdcall FreeIRQ(ULONG dwIRQHandle); ULONG _stdcall AllocateIO(ULONG dwIOPort, ULONG dwHandler); VOID _stdcall FreeIO(ULONG dwIOPort); PVOID _stdcall AllocateWindow(ULONG dwMemBaseAddress, ULONG dwWindowSize); VOID _stdcall FreeWindow(PVOID hMem); ULONG _stdcall SetWin32Event(ULONG hWin32Event); VOID _stdcall CloseVxdHandle(ULONG hWin32Event); VOID _stdcall YieldExecution(VOID); /* // Define wrappers for external VxD routines. */ #pragma warning (disable:4035) // disable no return value warning #ifndef _WFW_ ULONG VXDINLINE _VWIN32_SetWin32Event(ULONG hEvent) { _asm mov eax, [hEvent] VMMCall(_VWIN32_SetWin32Event) } ULONG VXDINLINE _VWIN32_CloseVxDHandle(ULONG hEvent) { _asm mov eax, [hEvent] VMMCall(_VWIN32_CloseVxDHandle) } VOID VXDINLINE VWIN32_DIOCCompletionRoutine(ULONG EventID) { Touch_Register(edx) __asm mov ebx, [EventID] VMMCall(VWIN32_DIOCCompletionRoutine); } HEVENT VXDINLINE Call_VM_Event(HVM hvm, void (__cdecl *pfnEvent)(), ULONG ulRefData) { HEVENT hevent; _asm mov ebx, [hvm] _asm mov edx, [ulRefData] _asm mov esi, [pfnEvent] VMMCall(Call_VM_Event) _asm mov [hevent], esi return(hevent); } #endif HVM VXDINLINE Get_Cur_VM_Handle(VOID) { HVM hvm; Touch_Register(ebx) VxDCall(Get_Cur_VM_Handle); _asm mov [hvm], ebx return(hvm); } ULONG VXDINLINE Install_IO_Handler(ULONG dwIOPort, ULONG dwHandler) { ULONG result = VXD_SUCCESS; _asm mov esi, [dwHandler] _asm mov edx, [dwIOPort] VMMCall(Install_IO_Handler); _asm rcr [result], 1 _asm sar [result], 31 return (result); } #ifndef _WFW_ VOID VXDINLINE Remove_IO_Handler(ULONG dwIOPort) { _asm mov edx, [dwIOPort] VMMCall(Remove_IO_Handler); } #endif // _WFW_ PVOID VXDINLINE _LinPageLock(ULONG Page, ULONG nPages, ULONG Flags) { _asm push [Flags] _asm push [nPages] _asm push [Page] VMMCall(_LinPageLock); _asm add esp, 4*3 } PVOID VXDINLINE _MapPhysToLinear(ULONG Page, ULONG nBytes, ULONG Flags) { _asm push [Flags] _asm push [nBytes] _asm push [Page] VMMCall(_MapPhysToLinear); _asm add esp, 4*3 } PVOID VXDINLINE _LinPageUnLock(ULONG Page, ULONG nPages, ULONG Flags) { _asm push [Flags] _asm push [nPages] _asm push [Page] VMMCall(_LinPageUnLock); _asm add esp, 4*3 } PVOID VXDINLINE _PageAllocate(DWORD nPages, DWORD pType, HVM hvm, DWORD AlignMask, DWORD minPhys, DWORD maxPhys, PVOID *PhysAddr, DWORD Flags) { _asm push [Flags] _asm push [PhysAddr] _asm push [maxPhys] _asm push [minPhys] _asm push [AlignMask] _asm push [hvm] _asm push [pType] _asm push [nPages] VMMCall(_LinPageUnLock); _asm add esp, 4*8 } BOOL VXDINLINE _PageFree(PVOID hMem, DWORD flags) { _asm push [flags] _asm push [hMem] VMMCall(_LinPageUnLock); _asm add esp, 4*2 } PVOID VXDINLINE PELDR_GetEntryPoint(HPEMODULE hModule) { __asm push hModule VMMCall(_PELDR_GetEntryPoint); __asm add esp, 4 } VOID VXDINLINE _BlockOnID(PVOID ThreadID, ULONG Flags) { _asm push [Flags] _asm push [ThreadID] VMMCall(_BlockOnID); _asm add esp, 4*2 } VOID VXDINLINE _SignalID(PVOID ThreadID) { __asm push ThreadID VMMCall(_SignalID); __asm add esp, 4 } #pragma warning (default:4035) // restore no return value warning #endif // _VXD_ #endif // _TPIWRAPS_H |
|
地板#
发布于:2001-09-10 17:59
#define WANTVXDWRAPS
的注释去掉试试。 不行,如果可以就把程序 MAIL 给我吧。这样说不清楚。 Asm386@sina.com Asm386@sohu.com |
|
|
地下室#
发布于:2001-09-10 20:15
我可以帮你搞定,把你的原码给我!!!lam123@263.net
|
|
|
5楼#
发布于:2001-09-11 08:54
我们曾经问过微软的技术支持,他们说,是用2000ddk去编译你的驱动,得到的sys文件一样可以在98下使用,只用去掉ndis3以上版本才支持的部分就可以了,我的网卡驱动就是这样做的,现在已经成功了,对了,inf文件还要使用98的。
|
|