You have something wrong in your build environment. Offhand I do not
know what it is. I just recreated your project on my system and built
it without errors using WDK6000 XP checked mode on my system. I’ve
included the log file from the build run,
==== buildchk_wxp_x86.log =====
BUILD: Examining e:\test\test directory for files to compile.
before AssemblyIdentity_AfterReadAllSources
after AssemblyIdentity_AfterReadAllSources
skipping post pass 0 command
Compiling e:\test\test *************
‘nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS1 NOLINK=1
MAKEDIR_RELATIVE_TO_BASEDIR= MAKEDIR_LOWERCASE=e:\test\test’
e:\test\test: TARGETPATH is …\lib\chk_wxp_x86
BUILDMSG: _NT_TARGET_VERSION SET TO WINXP
cl.exe @e:\test\test\objchk_wxp_x86\i386\cl.rsp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.220 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /Fo"e:\test\test\objchk_wxp_x86\i386/"
/FC
/Ii386
/I.
/IF:\ntddk\WinDDK\6000\inc\ddk
/IF:\ntddk\WinDDK\6000\inc\ddk
/Ie:\test\test\objchk_wxp_x86\i386
/IF:\ntddk\WinDDK\6000\inc\api
/IF:\ntddk\WinDDK\6000\inc\api
/IF:\ntddk\WinDDK\6000\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=0x0501
/DWINVER=0x0501
/D_WIN32_IE=0x0603
/DWIN32_LEAN_AND_MEAN=1
/DDEVL=1
/DDBG=1
/D__BUILDMACHINE__=WinDDK
/DFPO=0
/D_DLL=1
/D_MT=1
-DUNICODE
-D_UNICODE
/DDEPRECATE_DDK_FUNCTIONS=1
/DMSC_NOOPT
/DNTDDI_VERSION=0x05010200
/c
/Zc:wchar_t-
/Zl
/Zp8
/Gy
/Gm-
/W3
/Gz
/hotpatch
/EHs-c-
/GR-
/GF
/GS
/Z7
/Od
/Oi
/Oy-
/Z7
/FRe:\test\test\objchk_wxp_x86\i386\
-showIncludes
-DKMDF_MAJOR_VERSION=01
-DKMDF_MINOR_VERSION=005
/FIF:\ntddk\WinDDK\6000\inc\api\warning.h
.\commclient.cpp
commclient.cpp
Note: including file: F:\ntddk\WinDDK\6000\inc\api\warning.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\suppress.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\windows.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\sdkddkver.h
Note: including file: F:\ntddk\WinDDK\6000\inc\crt\excpt.h
Note: including file: F:\ntddk\WinDDK\6000\inc\crt\crtdefs.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\specstrings.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\sal.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\specstrings_adt.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\specstrings_strict.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\specstrings_undef.h
Note: including file: F:\ntddk\WinDDK\6000\inc\crt\stdarg.h
Note: including file: F:\ntddk\WinDDK\6000\inc\crt\crtdefs.h
Note: including file: F:\ntddk\WinDDK\6000\inc\crt\vadefs.h
Note: including file: F:\ntddk\WinDDK\6000\inc\crt\crtdefs.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\windef.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\winnt.h
Note: including file: F:\ntddk\WinDDK\6000\inc\crt\ctype.h
Note: including file: F:\ntddk\WinDDK\6000\inc\crt\crtdefs.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\basetsd.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\guiddef.h
Note: including file: F:\ntddk\WinDDK\6000\inc\crt\string.h
Note: including file: F:\ntddk\WinDDK\6000\inc\crt\crtdefs.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\pshpack4.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\poppack.h
Note: including file: f:\ntddk\winddk\6000\inc\api\pshpack4.h
Note: including file: f:\ntddk\winddk\6000\inc\api\pshpack2.h
Note: including file: f:\ntddk\winddk\6000\inc\api\poppack.h
Note: including file: f:\ntddk\winddk\6000\inc\api\pshpack2.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\pshpack2.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\poppack.h
Note: including file: f:\ntddk\winddk\6000\inc\api\poppack.h
Note: including file: f:\ntddk\winddk\6000\inc\api\pshpack8.h
Note: including file: f:\ntddk\winddk\6000\inc\api\poppack.h
Note: including file: f:\ntddk\winddk\6000\inc\api\poppack.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\ktmtypes.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\winbase.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\winerror.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\wingdi.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\pshpack1.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\poppack.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\pshpack2.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\poppack.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\pshpack2.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\poppack.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\pshpack4.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\poppack.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\pshpack4.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\poppack.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\winuser.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\pshpack2.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\poppack.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\tvout.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\winnls.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\wincon.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\winver.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\winreg.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\reason.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\winnetwk.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\stralign.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\winsvc.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\mcx.h
Note: including file: F:\ntddk\WinDDK\6000\inc\api\imm.h
Note: including file: F:\ntddk\WinDDK\6000\inc\ddk\FltUser.h
Note: including file: F:\ntddk\WinDDK\6000\inc\ddk\fltUserStructures.h
Note: including file: F:\ntddk\WinDDK\6000\inc\crt\stdio.h
Note: including file: F:\ntddk\WinDDK\6000\inc\crt\crtdefs.h
Note: including file: F:\ntddk\WinDDK\6000\inc\crt\swprintf.inl
Note: including file: F:\ntddk\WinDDK\6000\inc\crt\crtdefs.h
link.exe /lib /nologo /out:…\lib\chk_wxp_x86\i386\CommClient.lib
@C:\DOCUME~1\markr.OWL\LOCALS~1\Temp\nm4FD.tmp
Creating library …\lib\chk_wxp_x86\i386\CommClient.lib and object
…\lib\chk_wxp_x86\i386\CommClient.exp
Linking e:\test\test *************
‘nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS2 LINKONLY=1
NOPASS0=1 MAKEDLL=1 MAKEDIR_RELATIVE_TO_BASEDIR=
MAKEDIR_LOWERCASE=e:\test\test’
e:\test\test: TARGETPATH is …\lib\chk_wxp_x86
BUILDMSG: _NT_TARGET_VERSION SET TO WINXP
link.exe /out:…\lib\chk_wxp_x86\i386\CommClient.dll /machine:ix86
@C:\DOCUME~1\markr.OWL\LOCALS~1\Temp\nm4FE.tmp
Microsoft (R) Incremental Linker Version 8.00.50727.220
Copyright (C) Microsoft Corporation. All rights reserved.
/MERGE:_PAGE=PAGE
/MERGE:_TEXT=.text
/SECTION:INIT,d
/OPT:REF
/OPT:ICF
/IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221
/INCREMENTAL:NO
/FULLBUILD
/release
/NODEFAULTLIB
/WX
/debug
/debugtype:cv
/version:6.0
/osversion:6.0
/functionpadmin:5
/safeseh
/debug
/debugtype:cv,fixup
/opt:nowin98
/merge:.rdata=.text
/pdbcompress
/STACK:0x40000,0x1000
/dll
/base:@F:\ntddk\WinDDK\6000\bin\coffbase.txt,CommClient
/subsystem:console,5.01
/entry:_DllMainCRTStartup@12
…\lib\chk_wxp_x86\i386\CommClient.exp
objchk_wxp_x86\i386\commclient.obj
f:\ntddk\winddk\6000\lib\wxp\i386\msvcrt_winxp.obj
F:\ntddk\WinDDK\6000\lib\crt\i386\msvcrt.lib
f:\ntddk\winddk\6000\lib\wxp\i386\fltLib.lib
f:\ntddk\winddk\6000\lib\wxp\i386\kernel32.lib
f:\ntddk\winddk\6000\lib\wxp\i386\sehupd.lib
On Jan 16, 2008 2:13 AM, $BJvU-(B wrote:
> I want to build my minifilter driver with wdk 6000, my program is as
> following:
>
> sources
> /**********************************************************************************/
>
> TARGETNAME=CommClient
> TARGETTYPE=DYNLINK
> DLLENTRY=_DllMainCRTStartup
> DLLDEF=CommClient.def
> USE_MSVCRT=1
>
> TARGETPATH=…\lib$(BUILD_ALT_DIR)
>
> TARGETLIBS=$(TARGETLIBS) <br>> $(IFSKIT_LIB_PATH)\fltLib.lib <br>> $(SDK_LIB_PATH)\kernel32.lib
>
> C_DEFINES=$(C_DEFINES) -DUNICODE -D_UNICODE
>
> INCLUDES=$(INCLUDES); <br>> $(IFSKIT_INC_PATH); <br>> $(DDK_INC_PATH); <br>> $(API_INC_PATH);
>
> SOURCES=CommClient.cpp
>
> USER_C_FLAGS=-showIncludes
>
>
> CommClient.cpp
> /***********************************************************************/
> #include <windows.h>
> #include “FltUser.h”
> #include <stdio.h>
>
> #define COMM_PORT_NAME L"\CommPort"
>
> typedef enum _READ_DIR_COMMAND {
> FStart
> } READ_DIR_COMMAND;
>
> struct READ_DIR_MESSAGE {
> READ_DIR_COMMAND Command;
> };
>
> extern “C” _declspec(dllexport) bool SendReadMessage(void)
> {
> HRESULT hResult = S_OK;
> HANDLE port = INVALID_HANDLE_VALUE;
> DWORD bytesReturned = 0;
> READ_DIR_MESSAGE command;
>
> command.Command = FStart;
> hResult = FilterConnectCommunicationPort(L"\CommPort",
> 0,NULL,0,NULL,&port );
>
> if (IS_ERROR( hResult )) {
>
> printf( “Could not connect to filter: 0x%08x\n”, hResult );
> return 0;
> }
> else
> {
> printf(“connect ok \n”);
> }
>
> /*hResult = FilterSendMessage( port, &command, sizeof(READ_DIR_COMMAND),
> 0, 0, &bytesReturned ); */
>
>
> return TRUE;
> };
>
> CommClient.def
> / ********************************************************************* /
> LIBRARY CommClient
>
> EXPORTS
> SendReadMessage
>
>
> The build result is as following:
> D:\incubator\CommClient>build
>
> BUILD: Compile and Link for x86
> BUILD: Loading c:\winddk\6000\build.dat…
> BUILD: Computing Include file dependencies:
> BUILD: Start time: Wed Jan 16 10:14:57 2008
>
> BUILD: Examining d:\incubator\commclient directory for files to compile.
> d:\incubator\commclient - 1 source files (41 lines)
>
> BUILD: Saving c:\winddk\6000\build.dat…
> BUILD: Compiling d:\incubator\commclient directory
> _NT_TARGET_VERSION SET TO WINXP
> Compiling - commclient.cpp
>
> errors in directory d:\incubator\commclient
> d:\incubator\commclient\commclient.cpp(24) : error C3861:
> ‘FilterConnectCommunic
> ationPort’: identifier not found
> d:\incubator\commclient\commclient.cpp(36) : error C3861:
> ‘FilterSendMessage’: i
> dentifier not found
> Building Library - objchk_wxp_x86\i386\commclient.lib
> link : error LNK1181: cannot open input file
> 'objchk_wxp_x86\i386\commclient.obj
> '
> BUILD: Compile errors: not linking d:\incubator\commclient directory
> BUILD: Finish time: Wed Jan 16 10:14:58 2008
> BUILD: Done
>
> 3 files compiled - 2 Errors
> 1 library built - 1 Error
>
> D:\incubator\CommClient>
>
> The declare of FilterSendMessage and FilterConnectCommunic is in FltUser.h.
> error C3861: ‘FilterConnectCommunicationPort’: identifier not found
> error C3861: ‘FilterSendMessage’: identifier not found
> — NTFSD is sponsored by OSR For our schedule debugging and file system
> seminars (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars You are currently subscribed to ntfsd as:
> xxxxx@hollistech.com To unsubscribe send a blank email to
> xxxxx@lists.osr.com
–
Mark Roddy</stdio.h></windows.h>