FW: Build problem with WDK - v6000 (WDK)

Hi,

I’m developing a windows service which communicates with a custom
mini-filter driver.

The service calls certain filter function (e.g
FilterConnectCommunicationPort) for which it has to be linked with the
WDK filter library and header files.

For this I’ve added #include to <fltuser.h> and <fltuserstructures.h> to
the service project; also linked the project to fltLib.lib (available
with WDK v6000).

On building the service I get compile error as follows -

…\WinDDK\ 6000\ inc\ ddk\ fltUserStructures.h(22): fatal error C1012:
unmatched parenthesis : missing ‘)’

This line (22) refers to following code snippet from the
fltUserStructures.h

#if FLT_MGR_BASELINE

FLT_MGR_BASELINE is #defined as following in <fltuser.h> and there
doesn’t seem to be any parenthesis issue with the #define

#define FLT_MGR_BASELINE (((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WIN2KSP4))) || <br>
((OSVER(NTDDI_VERSION) == NTDDI_WINXP) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WINXPSP2))) || <br>
((OSVER(NTDDI_VERSION) == NTDDI_WS03) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WS03SP1))) || <br>
(NTDDI_VERSION >= NTDDI_LONGHORN))

Any idea why such error is thrown and the necessary workaround to
resolve it?

Thanks in Advance…

Amol Mandhare</fltuser.h></fltuserstructures.h></fltuser.h>

Hi,

try something like this:

#define WINVER _WIN32_WINNT_WINXP
#define _WIN32_WINNT _WIN32_WINNT_WINXP
#define NTDDI_VERSION NTDDI_WINXPSP2

#include <sdkddkver.h>
#include <fltuser.h>

--------------------------------------------------------------------------------------------------
“Amol Mandhare” wrote news:xxxxx@ntdev…
Hi,

I’m developing a windows service which communicates with a custom
mini-filter driver.
The service calls certain filter function (e.g
FilterConnectCommunicationPort) for which it has to be linked with the WDK
filter library and header files.
For this I’ve added #include to <fltuser.h> and <fltuserstructures.h> to the
service project; also linked the project to fltLib.lib (available with WDK
v6000).

On building the service I get compile error as follows -

…\WinDDK\ 6000\ inc\ ddk\ fltUserStructures.h(22): fatal error C1012:
unmatched parenthesis : missing ‘)’

This line (22) refers to following code snippet from the fltUserStructures.h

#if FLT_MGR_BASELINE

FLT_MGR_BASELINE is #defined as following in <fltuser.h> and there doesn’t
seem to be any parenthesis issue with the #define

#define FLT_MGR_BASELINE (((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WIN2KSP4))) || <br> ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WINXPSP2))) || <br> ((OSVER(NTDDI_VERSION) == NTDDI_WS03) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WS03SP1))) || <br> (NTDDI_VERSION >= NTDDI_LONGHORN))

Any idea why such error is thrown and the necessary workaround to resolve
it?

Thanks in Advance.

Amol Mandhare</fltuser.h></fltuserstructures.h></fltuser.h></fltuser.h></sdkddkver.h>

Hi Frank,

The compile error has changed to following after trying your suggestion

…\WinDDK\6000\inc\ddk\fltUserStructures.h (372): error C2065:
‘INSTANCE_BASIC_INFORMATION’ : undeclared identifier

Line (372) in fltUserStructures.h refers to following code -



typedef __struct_bcount(sizeof(INSTANCE_BASIC_INFORMATION) *
InstanceNameLength) struct _INSTANCE_BASIC_INFORMATION {

ULONG NextEntryOffset;

USHORT InstanceNameLength;
USHORT InstanceNameBufferOffset;

} INSTANCE_BASIC_INFORMATION, *PINSTANCE_BASIC_INFORMATION;


Regards,
Amol Mandhare

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of frank
Sent: Wednesday, February 07, 2007 2:05 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Build problem with WDK - v6000 (WDK)

Hi,

try something like this:

#define WINVER _WIN32_WINNT_WINXP
#define _WIN32_WINNT _WIN32_WINNT_WINXP
#define NTDDI_VERSION NTDDI_WINXPSP2

#include <sdkddkver.h>
#include <fltuser.h>

------------------------------------------------------------------------
--------------------------
“Amol Mandhare” wrote news:xxxxx@ntdev…
Hi,

I’m developing a windows service which communicates with a custom
mini-filter driver.
The service calls certain filter function (e.g
FilterConnectCommunicationPort) for which it has to be linked with the
WDK
filter library and header files.
For this I’ve added #include to <fltuser.h> and <fltuserstructures.h> to
the
service project; also linked the project to fltLib.lib (available with
WDK
v6000).

On building the service I get compile error as follows -

…\WinDDK\ 6000\ inc\ ddk\ fltUserStructures.h(22): fatal error C1012:
unmatched parenthesis : missing ‘)’

This line (22) refers to following code snippet from the
fltUserStructures.h

#if FLT_MGR_BASELINE

FLT_MGR_BASELINE is #defined as following in <fltuser.h> and there
doesn’t
seem to be any parenthesis issue with the #define

#define FLT_MGR_BASELINE (((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WIN2KSP4))) || <br> ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WINXPSP2))) || <br> ((OSVER(NTDDI_VERSION) == NTDDI_WS03) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WS03SP1))) || <br> (NTDDI_VERSION >= NTDDI_LONGHORN))

Any idea why such error is thrown and the necessary workaround to
resolve
it?

Thanks in Advance.

Amol Mandhare


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</fltuser.h></fltuserstructures.h></fltuser.h></fltuser.h></sdkddkver.h>

Amol, you are using the compiler that ships with the WDK, don’t you?

“Amol Mandhare” wrote news:xxxxx@ntdev…
Hi Frank,

The compile error has changed to following after trying your suggestion
-

…\WinDDK\6000\inc\ddk\fltUserStructures.h (372): error C2065:
‘INSTANCE_BASIC_INFORMATION’ : undeclared identifier

Line (372) in fltUserStructures.h refers to following code -

------------------------------------------------------------------------
-----------------
typedef __struct_bcount(sizeof(INSTANCE_BASIC_INFORMATION) *
InstanceNameLength) struct _INSTANCE_BASIC_INFORMATION {

ULONG NextEntryOffset;

USHORT InstanceNameLength;
USHORT InstanceNameBufferOffset;

} INSTANCE_BASIC_INFORMATION, *PINSTANCE_BASIC_INFORMATION;
------------------------------------------------------------------------
-----------------

Regards,
Amol Mandhare

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of frank
Sent: Wednesday, February 07, 2007 2:05 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Build problem with WDK - v6000 (WDK)

Hi,

try something like this:

#define WINVER _WIN32_WINNT_WINXP
#define _WIN32_WINNT _WIN32_WINNT_WINXP
#define NTDDI_VERSION NTDDI_WINXPSP2

#include <sdkddkver.h>
#include <fltuser.h>

------------------------------------------------------------------------
--------------------------
“Amol Mandhare” wrote news:xxxxx@ntdev…
Hi,

I’m developing a windows service which communicates with a custom
mini-filter driver.
The service calls certain filter function (e.g
FilterConnectCommunicationPort) for which it has to be linked with the
WDK
filter library and header files.
For this I’ve added #include to <fltuser.h> and <fltuserstructures.h> to
the
service project; also linked the project to fltLib.lib (available with
WDK
v6000).

On building the service I get compile error as follows -

…\WinDDK\ 6000\ inc\ ddk\ fltUserStructures.h(22): fatal error C1012:
unmatched parenthesis : missing ‘)’

This line (22) refers to following code snippet from the
fltUserStructures.h

#if FLT_MGR_BASELINE

FLT_MGR_BASELINE is #defined as following in <fltuser.h> and there
doesn’t
seem to be any parenthesis issue with the #define

#define FLT_MGR_BASELINE (((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WIN2KSP4))) || <br> ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WINXPSP2))) || <br> ((OSVER(NTDDI_VERSION) == NTDDI_WS03) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WS03SP1))) || <br> (NTDDI_VERSION >= NTDDI_LONGHORN))

Any idea why such error is thrown and the necessary workaround to
resolve
it?

Thanks in Advance.

Amol Mandhare


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</fltuser.h></fltuserstructures.h></fltuser.h></fltuser.h></sdkddkver.h>

Hi,

Nope.
To build the windows service we use Visual Studio .NET 2003.

Amol

Amol Mandhare
Software Engineer | Enterprise Vault | Symantec Corp

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of frank
Sent: Wednesday, February 07, 2007 2:49 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Build problem with WDK - v6000 (WDK)

Amol, you are using the compiler that ships with the WDK, don’t you?

“Amol Mandhare” wrote news:xxxxx@ntdev…
Hi Frank,

The compile error has changed to following after trying your suggestion
-

…\WinDDK\6000\inc\ddk\fltUserStructures.h (372): error C2065:
‘INSTANCE_BASIC_INFORMATION’ : undeclared identifier

Line (372) in fltUserStructures.h refers to following code -

------------------------------------------------------------------------
-----------------
typedef __struct_bcount(sizeof(INSTANCE_BASIC_INFORMATION) *
InstanceNameLength) struct _INSTANCE_BASIC_INFORMATION {

ULONG NextEntryOffset;

USHORT InstanceNameLength;
USHORT InstanceNameBufferOffset;

} INSTANCE_BASIC_INFORMATION, *PINSTANCE_BASIC_INFORMATION;
------------------------------------------------------------------------
-----------------

Regards,
Amol Mandhare

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of frank
Sent: Wednesday, February 07, 2007 2:05 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Build problem with WDK - v6000 (WDK)

Hi,

try something like this:

#define WINVER _WIN32_WINNT_WINXP
#define _WIN32_WINNT _WIN32_WINNT_WINXP
#define NTDDI_VERSION NTDDI_WINXPSP2

#include <sdkddkver.h>
#include <fltuser.h>

------------------------------------------------------------------------
--------------------------
“Amol Mandhare” wrote news:xxxxx@ntdev…
Hi,

I’m developing a windows service which communicates with a custom
mini-filter driver.
The service calls certain filter function (e.g
FilterConnectCommunicationPort) for which it has to be linked with the
WDK
filter library and header files.
For this I’ve added #include to <fltuser.h> and <fltuserstructures.h> to
the
service project; also linked the project to fltLib.lib (available with
WDK
v6000).

On building the service I get compile error as follows -

…\WinDDK\ 6000\ inc\ ddk\ fltUserStructures.h(22): fatal error C1012:
unmatched parenthesis : missing ‘)’

This line (22) refers to following code snippet from the
fltUserStructures.h

#if FLT_MGR_BASELINE

FLT_MGR_BASELINE is #defined as following in <fltuser.h> and there
doesn’t
seem to be any parenthesis issue with the #define

#define FLT_MGR_BASELINE (((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WIN2KSP4))) || <br> ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WINXPSP2))) || <br> ((OSVER(NTDDI_VERSION) == NTDDI_WS03) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WS03SP1))) || <br> (NTDDI_VERSION >= NTDDI_LONGHORN))

Any idea why such error is thrown and the necessary workaround to
resolve
it?

Thanks in Advance.

Amol Mandhare


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</fltuser.h></fltuserstructures.h></fltuser.h></fltuser.h></sdkddkver.h>

In my experience this is just asking for build trouble. To combine
components from the VS build environment and the DDK build environment
use a library and header file of your own built with the DDK and used by
VS. The library uses the DDK headers, the VS components use your header
and the library.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Amol Mandhare
Sent: Wednesday, February 07, 2007 5:00 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Build problem with WDK - v6000 (WDK)

Hi,

Nope.
To build the windows service we use Visual Studio .NET 2003.

Amol

Amol Mandhare
Software Engineer | Enterprise Vault | Symantec Corp

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of frank
Sent: Wednesday, February 07, 2007 2:49 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Build problem with WDK - v6000 (WDK)

Amol, you are using the compiler that ships with the WDK, don’t you?

“Amol Mandhare” wrote news:xxxxx@ntdev…
Hi Frank,

The compile error has changed to following after trying your suggestion
-

…\WinDDK\6000\inc\ddk\fltUserStructures.h (372): error C2065:
‘INSTANCE_BASIC_INFORMATION’ : undeclared identifier

Line (372) in fltUserStructures.h refers to following code -

------------------------------------------------------------------------
-----------------
typedef __struct_bcount(sizeof(INSTANCE_BASIC_INFORMATION) *
InstanceNameLength) struct _INSTANCE_BASIC_INFORMATION {

ULONG NextEntryOffset;

USHORT InstanceNameLength;
USHORT InstanceNameBufferOffset;

} INSTANCE_BASIC_INFORMATION, *PINSTANCE_BASIC_INFORMATION;
------------------------------------------------------------------------
-----------------

Regards,
Amol Mandhare

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of frank
Sent: Wednesday, February 07, 2007 2:05 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Build problem with WDK - v6000 (WDK)

Hi,

try something like this:

#define WINVER _WIN32_WINNT_WINXP
#define _WIN32_WINNT _WIN32_WINNT_WINXP
#define NTDDI_VERSION NTDDI_WINXPSP2

#include <sdkddkver.h>
#include <fltuser.h>

------------------------------------------------------------------------
--------------------------
“Amol Mandhare” wrote news:xxxxx@ntdev…
Hi,

I’m developing a windows service which communicates with a custom
mini-filter driver.
The service calls certain filter function (e.g
FilterConnectCommunicationPort) for which it has to be linked with the
WDK
filter library and header files.
For this I’ve added #include to <fltuser.h> and <fltuserstructures.h> to
the
service project; also linked the project to fltLib.lib (available with
WDK
v6000).

On building the service I get compile error as follows -

…\WinDDK\ 6000\ inc\ ddk\ fltUserStructures.h(22): fatal error C1012:
unmatched parenthesis : missing ‘)’

This line (22) refers to following code snippet from the
fltUserStructures.h

#if FLT_MGR_BASELINE

FLT_MGR_BASELINE is #defined as following in <fltuser.h> and there
doesn’t
seem to be any parenthesis issue with the #define

#define FLT_MGR_BASELINE (((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WIN2KSP4))) || <br> ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WINXPSP2))) || <br> ((OSVER(NTDDI_VERSION) == NTDDI_WS03) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WS03SP1))) || <br> (NTDDI_VERSION >= NTDDI_LONGHORN))

Any idea why such error is thrown and the necessary workaround to
resolve
it?

Thanks in Advance.

Amol Mandhare


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</fltuser.h></fltuserstructures.h></fltuser.h></fltuser.h></sdkddkver.h>

Amol,

I have had success using VS .NET 2005 (and I think 2003 as well) to build our user-mode service. Also, include only fltuser.h as that also includes fltuserstructures.h.

Here are the macros I define:

// This is a WIN32 program, in case you didn’t know
#ifndef _WIN32
#define _WIN32
#endif

#define WINVER 0x500
#define _WIN32_WINNT 0x0500
#define NTDDI_VERSION NTDDI_WIN2KSP4

This webpage might also help you:

http://www.codecomments.com/archive421-2005-8-559279.html

-Bill