阅读:1938回复:0
DDK编译一堆错误,请帮忙指正啊!急死了~~~直接用ifsddk , server 2003 , check build编译,出现了如下的错误: BUILD: Computing Include file dependencies: BUILD: Examining d:\winddk\3790\src\filesys\filter\sfilter directory for files to compile. Compiling d:\winddk\3790\src\filesys\filter\sfilter directory ******************** 'nmake.exe /c BUILDMSG=Stop. -i NTTEST= UMTEST= NOLINK=1 NOPASS0=1 386=1' rc -l 409 -DSXS_ASSEMBLY_NAME="""""" -DSXS_ASSEMBLY_VERSION="""""" -DSXS_ASSEMBLY_LANGUAGE="""""" -DSXS_PROCESSOR_ARCHITECTURE="""x86""" -DSXS_TARGET="""sfilter.sys""" -DSYSTEM_COMPATIBLE_ASSEMBLY_NAME="""Microsoft.Windows.SystemCompatible""" -DLSYSTEM_COMPATIBLE_ASSEMBLY_NAME=L"""Microsoft.Windows.SystemCompatible""" -z "MS Sans Serif,Helv/MS Shell Dlg" -r -fo objchk_wnet_x86\i386\sfilter.res -D_X86_=1 -Di386=1 -DSTD_CALL -DCONDITION_HANDLING=1 -DNT_INST=0 -DWIN32=100 -D_NT1X_=100 -DWINNT=1 -D_WIN32_WINNT=0x0502 /DWINVER=0x0502 -D_WIN32_IE=0x0600 -DWIN32_LEAN_AND_MEAN=1 -DDEVL=1 -DDBG=1 -D__BUILDMACHINE__=WinDDK -DFPO=0 -DNDEBUG -D_DLL=1 -ID:\WINDDK\3790\inc\mfc42 -Iobjchk_wnet_x86\i386 -ID:\WINDDK\3790\inc\wnet -ID:\WINDDK\3790\inc\wnet -ID:\WINDDK\3790\inc\ddk\wnet -ID:\WINDDK\3790\inc\ifs\wnet -ID:\WINDDK\3790\inc\crt .\sfilter.rc cl -nologo -Ii386\ -I. -ID:\WINDDK\3790\inc\mfc42 -Iobjchk_wnet_x86\i386 -ID:\WINDDK\3790\inc\wnet -ID:\WINDDK\3790\inc\wnet -ID:\WINDDK\3790\inc\ddk\wnet -ID:\WINDDK\3790\inc\ifs\wnet -ID:\WINDDK\3790\inc\crt -D_X86_=1 -Di386=1 -DSTD_CALL -DCONDITION_HANDLING=1 -DNT_INST=0 -DWIN32=100 -D_NT1X_=100 -DWINNT=1 -D_WIN32_WINNT=0x0502 /DWINVER=0x0502 -D_WIN32_IE=0x0600 -DWIN32_LEAN_AND_MEAN=1 -DDEVL=1 -DDBG=1 -D__BUILDMACHINE__=WinDDK -DFPO=0 -DNDEBUG -D_DLL=1 /c /Zel /Zp8 /Gy /Gi- /Gm- -cbstring /W3 /WX /Gz /QIfdiv- /G6 /GX- /GR- /GF /GS -Z7 /Od /Oi /Oy- -FID:\WINDDK\3790\inc\wnet\warning.h .\sfilter.c sfilter.c d:\WINDDK\3790\src\filesys\filter\sfilter\sfilter.c(2265) : error C2275: 'NTSTATUS' : illegal use of this type as an expression d:\WINDDK\3790\inc\wnet\ntdef.h(562) : see declaration of 'NTSTATUS' d:\WINDDK\3790\src\filesys\filter\sfilter\sfilter.c(2265) : error C2146: syntax error : missing ';' before identifier 'SfCreateCompletion' d:\WINDDK\3790\src\filesys\filter\sfilter\sfilter.c(2265) : error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>' d:\WINDDK\3790\src\filesys\filter\sfilter\sfilter.c(2265) : error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>' d:\WINDDK\3790\src\filesys\filter\sfilter\sfilter.c(2265) : error C2143: syntax error : missing ';' before 'identifier' d:\WINDDK\3790\src\filesys\filter\sfilter\sfilter.c(2266) : error C2143: syntax error : missing ')' before 'type' d:\WINDDK\3790\src\filesys\filter\sfilter\sfilter.c(2266) : error C2198: 'SfCreateCompletion' : too few arguments for call through pointer-to-function d:\WINDDK\3790\src\filesys\filter\sfilter\sfilter.c(2268) : error C2059: syntax error : ')' d:\WINDDK\3790\src\filesys\filter\sfilter\sfilter.c(2301) : error C2065: 'Context' : undeclared identifier d:\WINDDK\3790\src\filesys\filter\sfilter\sfilter.c(2307) : error C2061: syntax error : identifier 'SfCleanupClose' d:\WINDDK\3790\src\filesys\filter\sfilter\sfilter.c(2307) : error C2059: syntax error : ';' d:\WINDDK\3790\src\filesys\filter\sfilter\sfilter.c(2308) : error C2059: syntax error : 'type' 代码行2265~行2308如下: NTSTATUS SfCreateCompletion ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context) /*++ Routine Description: This function is the create/open completion routine for this filter file system driver. If debugging is enabled, then this function prints the name of the file that was successfully opened/created by the file system as a result of the specified I/O request. Arguments: DeviceObject - Pointer to the device on which the file was created. Irp - Pointer to the I/O Request Packet the represents the operation. Context - This driver's context parameter - unused; Return Value: The function value is STATUS_SUCCESS. --*/ { //PKEVENT event = Context; UNREFERENCED_PARAMETER( DeviceObject ); UNREFERENCED_PARAMETER( Irp ); ASSERT(IS_MY_DEVICE_OBJECT( DeviceObject )); KeSetEvent((PKEVENT)Context, IO_NO_INCREMENT, FALSE); return STATUS_MORE_PROCESSING_REQUIRED; } NTSTATUS SfCleanupClose ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp ) /*++ Routine Description: This routine is invoked whenever a cleanup or a close request is to be processed. Arguments: DeviceObject - Pointer to the device object for this driver. Irp - Pointer to the request packet representing the I/O request. Return Value: The function value is the status of the operation. Note: See notes for SfPassThrough for this routine. --*/ { PIO_STACK_LOCATION irpSp; // irpSp = IoGetCurrentIrpStackLocation( Irp ); PSFILTER_DEVICE_EXTENSION devExt=(PSFILTER_DEVICE_EXTENSION)DeviceObject->DeviceExtension; irpSp = IoGetCurrentIrpStackLocation( Irp ); PAGED_CODE(); // // Sfilter doesn't allow handles to its control device object to be created, // therefore, no other operation should be able to come through. // ASSERT(!IS_MY_CONTROL_DEVICE_OBJECT( DeviceObject )); ASSERT(IS_MY_DEVICE_OBJECT( DeviceObject )); // // Get this driver out of the driver stack and get to the next driver as // quickly as possible. // if (!devExt->StorageStackDeviceObject){ IoSkipCurrentIrpStackLocation( Irp ); return IoCallDriver( devExt->AttachedToDeviceObject, Irp ); } #if DBG if (devExt->Focus != We_Focus){ IoSkipCurrentIrpStackLocation(Irp); return IoCallDriver( devExt->AttachedToDeviceObject, Irp); } #endif // Sf_name_record_delete((PFILE_OBJECT)irpSp->FileObject); KdPrint(("Sfilter!SfCleanupClose:\r\n")); IoSkipCurrentIrpStackLocation( Irp ); // // Now call the appropriate file system driver with the request. // return IoCallDriver( devExt->AttachedToDeviceObject, Irp ); } 万分感谢!! |
|