my code is as following:
/***********************************************************************************************/
// Com.cpp : Defines the entry point for the console application.
//
#include “stdafx.h”
#include <fltuser.h>
#define COMM_PORT_NAME L"\CommPort <file:></file:>“;
typedef enum _READ_DIR_COMMAND {
FStart
} READ_DIR_COMMAND;
struct READ_DIR_MESSAGE {
READ_DIR_COMMAND Command;
};
int main(int argc, char* argv)
{
HRESULT hResult = S_OK;
HANDLE port = INVALID_HANDLE_VALUE;
DWORD bytesReturned = 0;
READ_DIR_MESSAGE command;
command.Command = FStart;
hResult = FilterConnectCommunicationPort(L”\CommPort <file:></file:>",
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 0;
}
/ *********************************************************************************************** /
In above program, i want to send a message to driver, but when I build the
entire solution in VC6, I get the
following build error for several of the projects:
--------------------Configuration: Com - Win32 Debug--------------------
Compiling…
Com.cpp
c:\winddk\6000\inc\ddk\fltuserstructures.h(22) : fatal error C1012:
unmatched parenthesis : missing ‘)’
of course, when i build it with wdk, it’s ok. But in my client program,
there are some code can’t be builded with WDK, so i want to build them in
VC6, but get above build problem, how can i do?</fltuser.h>