Compile Error (C1012)

Hi, I am trying to include fltuser.h in my project but I get this error

"1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(22) : error C1012: unmatche
d parenthesis : missing ‘)’ "

I have only included fltuser.h and I am using Pelles C for Windows as my text editor(NOT COMPILER).

Can you please help me.

Thanks

Hello
If I were you, I will would have used more stable environment such as http://visualddk.sysprogs.org which allows seamleass integration to visual studio. This would allow you to dig deeper in the source of the problem.
Abhishek

Date: Fri, 25 Mar 2011 01:45:42 -0400
From: xxxxx@live.com
To: xxxxx@lists.osr.com
Subject: [ntdev] Compile Error (C1012)

Hi, I am trying to include fltuser.h in my project but I get this error

"1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(22) : error C1012: unmatche
d parenthesis : missing ‘)’ "

I have only included fltuser.h and I am using Pelles C for Windows as my text editor(NOT COMPILER).

Can you please help me.

Thanks


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

From \src\filesys\miniFilter\scanner\user\scanUser.c:

#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <winioctl.h>
#include <string.h>
#include <crtdbg.h>
#include <assert.h>
#include <fltuser.h>

Mark Roddy

On Fri, Mar 25, 2011 at 1:45 AM, wrote:
> Hi, I am trying to include fltuser.h in my project but I get this error
>
> "1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(22) : error C1012: unmatche
> d parenthesis : missing ‘)’ "
>
> I have only included fltuser.h and I am using Pelles C for Windows as my text editor(NOT COMPILER).
>
> Can you please help me.
>
> Thanks
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
></fltuser.h></assert.h></crtdbg.h></string.h></winioctl.h></stdio.h></stdlib.h></windows.h>

thanks, i’ll try mark’s solution.
i tried visual ddk a while ago and it kept saying it couldn’t find the headers, meaning i gave it an invalid path but i did not.

wrote in message news:xxxxx@ntdev…
> Hi, I am trying to include fltuser.h in my project but I get this error
>
> "1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(22) : error C1012:
> unmatche
> d parenthesis : missing ‘)’ "
>
> I have only included fltuser.h and I am using Pelles C for Windows as my
> text editor(NOT COMPILER).
>
> Can you please help me.
>
> Thanks

I’ve answered you in the MS forum. Looks like sdkddkver.h is missing.
This is because WDK has a newer and different structure of usermode include
files than Visual Studio 2008 or earlier.

One possible solution is to use only WDK set of includes instead of provided
with VC or SDK.
But this may be not compatible with older compilers or libs.
Another solution is to build native usermode stuff with WDK as well ( with
the SOURCES files and so on).

Regards,
– pa

Did you look at that line? Does it have matched parentheses?

Did you look at the line after it was expanded by the preprocessor? Does it
have matched parentheses?

What is on the line? (Are we expected to go back and read it for you?). Is
it the first non-blank non-comment line in the header file? If so, what
preceded in syntactically?

Seriously, you ARE expected to have basic skills in reading code and
reporting errors. When you report a syntax error, it is expected you will
show the line on which the error occurs.

I fail to understand why you think the editor you might be using could have
anything to do with this. Why is it even worthy of mention? You could have
spent that line telling us something USEFUL.
joe

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@live.com
Sent: Friday, March 25, 2011 12:46 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Compile Error (C1012)

Hi, I am trying to include fltuser.h in my project but I get this error

"1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(22) : error C1012:
unmatche
d parenthesis : missing ‘)’ "

I have only included fltuser.h and I am using Pelles C for Windows as my
text editor(NOT COMPILER).

Can you please help me.

Thanks


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

@Pavel A. you must be mistaking me with someone else as this is my second time posting here with a different issue.
@Joseph, this error has been seen around and in almost every case it has a thing to do with Visual Studio/ddk which is not my case since i’m using none of those.And i expected you to know the error since it’s been discussed here before.

Anyways i’m not on my pc right now so i can’t post it. but i remember it was ‘#if XXXXX_XXX’

i’ll try what mark suggested first.
cheers

Here is a snippet of the file:

#ifndef FLT_USER_STRUCTURES_H
#define FLT_USER_STRUCTURES_H

#if FLT_MGR_BASELINE ////---------------> This is where the error occurs. I have double checked and the #if #endif directives match. I tried inserting the whole file at the include point in fltuser.h and it still showed the same error.

I found this in fltuserstructures.h after " #if FLT_MGR_BASELINE "

//
// Disable warning for this file
//

I tried #pragma warning(disable: 1012)

But It did not work.

Any suggestions ?

I think that Pavel might be correct. If you look at the definition of
FLT_MGR_BASELINE, the problem is due to the expansion:

#define FLT_MGR_BASELINE (((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WIN2KSP4))) || \
((OSVER(NTDDI_VERSION) == NTDDI_WINXP) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WINXPSP2))) || \
((OSVER(NTDDI_VERSION) == NTDDI_WS03) &&
(SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WS03SP1))) || \
(NTDDI_VERSION >= NTDDI_VISTA))

And

From sdkddkver.h:

#define OSVER(Version) ((Version) & OSVERSION_MASK)
#define SPVER(Version) (((Version) & SPVERSION_MASK) >> 8)
#define SUBVER(Version) (((Version) & SUBVERSION_MASK) )

I’d reconsider Pavel’s advice.

Good luck,

mm
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@live.com
Sent: Saturday, March 26, 2011 6:44 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Compile Error (C1012)

Here is a snippet of the file:

#ifndef FLT_USER_STRUCTURES_H
#define FLT_USER_STRUCTURES_H

#if FLT_MGR_BASELINE ////---------------> This is where the error
occurs. I have double checked and the #if #endif directives match. I tried
inserting the whole file at the include point in fltuser.h and it still
showed the same error.

I found this in fltuserstructures.h after " #if FLT_MGR_BASELINE "

//
// Disable warning for this file
//

I tried #pragma warning(disable: 1012)

But It did not work.

Any suggestions ?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

If I hide it / comment it, it compiles, but I think it’s needed since all the functions are defined inside it. So would stripping the code to a user defined include file be a better way to go? Because this is shitty and I’m mad.

No.

Read Pavel’s reply. He lays out your options there.

Mm
On Mar 26, 2011 11:02 PM, wrote:
> If I hide it / comment it, it compiles, but I think it’s needed since all
the functions are defined inside it. So would stripping the code to a user
defined include file be a better way to go? Because this is shitty and I’m
mad.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

sdkddkver.h is there and when I explicitly include it I get other tons of errors.

I have two versions of sdkddkver.h. One is from VS 2010 SDK and the other one is from the WDK.

I tried them all, they give me errors . This is pissing me off beyond pissitivity itself, damnit . I need to take a break.

OK.

Can you use only the WDK to build, as Pavel suggested? That may not work
either, though for different reasons.

I realize that this is a pita, but you can’t mix and match here.

Good luck,

Mm
On Mar 26, 2011 11:20 PM, wrote:
> sdkddkver.h is there and when I explicitly include it I get other tons of
errors.
>
> I have two versions of sdkddkver.h. One is from VS 2010 SDK and the other
one is from the WDK.
>
> I tried them all, they give me errors . This is pissing me off beyond
pissitivity itself, damnit . I need to take a break.
>
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Here is the log if you are at all interested anymore…

  1. Start >> All Programs >> Windows Driver Kits >> WDK 7600.16385.1>>Build Environments>>Windows XP >> x86 Checked Build Env.

*************** START LOG ***************************
C:\My_Drivers>build -gZ
path contains nonexistant %systemroot%\system32, removing
path contains nonexistant %systemroot%, removing
path contains nonexistant %systemroot%\system32\wbem, removing
path contains nonexistant c:\program files\common files\roxio shared\9.0\dllshar
ed, removing
path contains nonexistant c:\sheerpower, removing
path contains nonexistant c:\sheerpower\ars, removing
path contains nonexistant c:\sheerpower, removing
path contains nonexistant \sptools, removing
path contains nonexistant c:\progra~1\tieduc~1\ti-83p~1\utils, removing
path contains nonexistant c:\php\ext, removing
path contains nonexistant c:\hla, removing
path contains nonexistant c:\hla, removing
BUILD: Compile and Link for x86
BUILD: Start time: Sat Mar 26 23:44:22 2011
BUILD: Examining c:\my_drivers directory for files to compile.
c:\my_drivers Invalidating OACR warning log for ‘root:x86chk’
BUILD: Compiling and Linking c:\my_drivers directory
Configuring OACR for ‘root:x86chk’ -
_NT_TARGET_VERSION SET TO WINXP
Compiling - main.c
1>errors in directory c:\my_drivers
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(39) : error C2061: syntax e
rror : identifier ‘HFILTER’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(39) : error C2059: syntax e
rror : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(40) : error C2061: syntax e
rror : identifier ‘HFILTER_INSTANCE’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(40) : error C2059: syntax e
rror : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(41) : error C2061: syntax e
rror : identifier ‘HFILTER_VOLUME’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(41) : error C2059: syntax e
rror : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(51) : error C2143: syntax e
rror : missing ‘)’ before ‘return’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(51) : error C2143: syntax e
rror : missing ‘{’ before ‘return’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(51) : error C2059: syntax e
rror : ‘return’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(51) : error C2059: syntax e
rror : ‘)’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(52) : error C2143: syntax e
rror : missing ‘{’ before ‘'
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(122) : error C2016: C requi
res that a struct or union has at least one member
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(122) : error C2061: syntax
error : identifier ‘ULONG’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(124) : error C2061: syntax
error : identifier ‘FrameID’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(124) : error C2059: syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(126) : error C2061: syntax
error : identifier ‘NumberOfInstances’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(126) : error C2059: syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(128) : error C2061: syntax
error : identifier ‘FilterNameLength’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(128) : error C2059: syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(129) : error C2061: syntax
error : identifier ‘FilterNameBuffer’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(129) : error C2059: syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(129) : error C3409: empty a
ttribute block is not allowed
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(129) : error C2143: syntax
error : missing ‘]’ before ‘constant’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(131) : error C2059: syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(145) : error C2016: C requi
res that a struct or union has at least one member
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(145) : error C2061: syntax
error : identifier ‘ULONG’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(151) : error C2061: syntax
error : identifier ‘Flags’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(151) : error C2059: syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(163) : error C2016: C requi
res that a struct or union has at least one member
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(163) : error C2061: syntax
error : identifier ‘ULONG’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(165) : error C2061: syntax
error : identifier ‘NumberOfInstances’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(165) : error C2059: syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(167) : error C2061: syntax
error : identifier ‘FilterNameLength’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(167) : error C2059: syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(168) : error C2061: syntax
error : identifier ‘FilterNameBufferOffset’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(168) : error C2059: syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(170) : error C2061: syntax
error : identifier ‘FilterAltitudeLength’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(170) : error C2059: syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(171) : error C2061: syntax
error : identifier ‘FilterAltitudeBufferOffset’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(171) : error C2059: syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(173) : error C2059: syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(181) : error C2016: C requi
res that a struct or union has at least one member
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(181) : error C2061: syntax
error : identifier ‘USHORT’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(182) : error C2061: syntax
error : identifier ‘FilterNameBufferOffset’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(182) : error C2059: syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(184) : error C2059: syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(186) : error C2059: syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(188) : error C2059: syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(289) : error C2016: C requi
res that a struct or union has at least one member
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(289) : error C2061: syntax
error : identifier ‘USHORT’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(295) : error C2061: syntax
error : identifier ‘FilterVolumeName’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(295) : error C2059: syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(295) : error C3409: empty a
ttribute block is not allowed
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(295) : error C2143: syntax
error : missing ‘]’ before ‘constant’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(297) : error C2059: syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(372) : error C2143: syntax
error : missing ‘)’ before ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(372) : error C2143: syntax
error : missing ‘{’ before ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(372) : error C2059: syntax
error : ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(381) : error C2143: syntax
error : missing ‘)’ before ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(381) : error C2143: syntax
error : missing ‘{’ before ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(381) : error C2059: syntax
error : ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(393) : error C2143: syntax
error : missing ‘)’ before ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(393) : error C2143: syntax
error : missing ‘{’ before ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(393) : error C2059: syntax
error : ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(554) : error C2016: C requi
res that a struct or union has at least one member
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(554) : error C2061: syntax
error : identifier ‘ULONG’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(564) : error C2061: syntax
error : identifier ‘MessageId’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(564) : error C2059: syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(570) : error C2059: syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(581) : error C2016: C requi
res that a struct or union has at least one member
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(581) : error C2061: syntax
error : identifier ‘NTSTATUS’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(590) : error C2061: syntax
error : identifier ‘MessageId’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(590) : error C2059: syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(596) : error C2059: syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(83) : error C2061: syntax error : ide
ntifier ‘HRESULT’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(83) : error C2059: syntax error : ‘;’

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(85) : error C2061: syntax error : ide
ntifier ‘FilterLoad’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(85) : error C2059: syntax error : ‘;’

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(86) : error C2146: syntax error : mis
sing ‘)’ before identifier ‘LPCWSTR’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(86) : error C2061: syntax error : ide
ntifier ‘LPCWSTR’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(87) : error C2059: syntax error : ‘)’

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(90) : error C2061: syntax error : ide
ntifier ‘HRESULT’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(90) : error C2059: syntax error : ‘;’

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(92) : error C2061: syntax error : ide
ntifier ‘FilterUnload’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(92) : error C2059: syntax error : ‘;’

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(93) : error C2146: syntax error : mis
sing ‘)’ before identifier ‘LPCWSTR’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(93) : error C2061: syntax error : ide
ntifier ‘LPCWSTR’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(94) : error C2059: syntax error : ‘)’

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(108) : error C2061: syntax error : id
entifier ‘HRESULT’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(108) : error C2059: syntax error : ‘;

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(110) : error C2061: syntax error : id
entifier ‘FilterCreate’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(110) : error C2059: syntax error : ‘;

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(111) : error C2146: syntax error : mi
ssing ‘)’ before identifier ‘LPCWSTR’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(111) : error C2061: syntax error : id
entifier ‘LPCWSTR’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(112) : error C2146: syntax error : mi
ssing ‘;’ before identifier ‘HFILTER’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(112) : error C2143: syntax error : mi
ssing ‘{’ before '

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(113) : error C2059: syntax error : ‘)

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(116) : error C2061: syntax error : id
entifier ‘WINAPI’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(116) : error C2059: syntax error : ‘;

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(118) : error C2146: syntax error : mi
ssing ‘)’ before identifier ‘HFILTER’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(118) : error C2061: syntax error : id
entifier ‘HFILTER’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(118) : error C1003: error count excee
ds 100; stopping compilation
Linking Executable - objchk_wxp_x86\i386\wilh_chckd_build.sys
BUILD: Finish time: Sat Mar 26 23:44:23 2011
BUILD: Done

3 files compiled - 12 Warnings - 102 Errors
1 executable built -------------------------------------------> Why it still builds, I don’t know.

C:\My_Drivers>
END LOG*****************

The output indicates that a driver, oddly enough named
‘wlh_chckd_build.sys’ has been built. You are building a user mode
application, right? You are using the WDK it seems. You should use the
list of WDK-contained include files (or a useful subset thereof) I
pointed you at earlier. Those work. The user mode mini-filter
application samples in the WDK build just fine. Do not mix SDK/VS/etc
and WDK include file sets - that is a recipe for disaster. If you need
access to WDK defined user mode facilities, build a library interface
from the WDK and use that and your own include file for your VS or SDK
based applications.

Mark Roddy

On Sat, Mar 26, 2011 at 11:52 PM, wrote:
> Linking Executable - objchk_wxp_x86\i386\wilh_chckd_build.sys
>

Are you sure that your environment is correct/unmodified? In particular, I
don’t see how %systemroot% could be ‘nonexistant’ in any correctly setup
system.

path contains nonexistant %systemroot%, removing

Although I don’t know if this is your specific problem, an incorrectly setup
build environment could definitely cause problems like this, and based on
what you’re showing below, all bets are off - nonstandard build environments
are just not something that can reasonably be debugged remotely.

Also, it’s a good idea to include ‘-c’ in your build command line, as
dependency tracking doesn’t work.

Good luck,

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@live.com
Sent: Saturday, March 26, 2011 11:53 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Compile Error (C1012)

Here is the log if you are at all interested anymore…

  1. Start >> All Programs >> Windows Driver Kits >> WDK 7600.16385.1>>Build
    Environments>>Windows XP >> x86 Checked Build Env.

*************** START LOG ***************************
C:\My_Drivers>build -gZ
path contains nonexistant %systemroot%\system32, removing
path contains nonexistant %systemroot%, removing
path contains nonexistant %systemroot%\system32\wbem, removing
path contains nonexistant c:\program files\common files\roxio
shared\9.0\dllshar
ed, removing
path contains nonexistant c:\sheerpower, removing
path contains nonexistant c:\sheerpower\ars, removing
path contains nonexistant c:\sheerpower, removing
path contains nonexistant \sptools, removing
path contains nonexistant c:\progra~1\tieduc~1\ti-83p~1\utils, removing
path contains nonexistant c:\php\ext, removing
path contains nonexistant c:\hla, removing
path contains nonexistant c:\hla, removing
BUILD: Compile and Link for x86
BUILD: Start time: Sat Mar 26 23:44:22 2011
BUILD: Examining c:\my_drivers directory for files to compile.
c:\my_drivers Invalidating OACR warning log for ‘root:x86chk’
BUILD: Compiling and Linking c:\my_drivers directory
Configuring OACR for ‘root:x86chk’ -
_NT_TARGET_VERSION SET TO WINXP
Compiling - main.c
1>errors in directory c:\my_drivers
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(39) : error C2061:
syntax e
rror : identifier ‘HFILTER’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(39) : error C2059:
syntax e
rror : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(40) : error C2061:
syntax e
rror : identifier ‘HFILTER_INSTANCE’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(40) : error C2059:
syntax e
rror : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(41) : error C2061:
syntax e
rror : identifier ‘HFILTER_VOLUME’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(41) : error C2059:
syntax e
rror : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(51) : error C2143:
syntax e
rror : missing ‘)’ before ‘return’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(51) : error C2143:
syntax e
rror : missing ‘{’ before ‘return’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(51) : error C2059:
syntax e
rror : ‘return’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(51) : error C2059:
syntax e
rror : ‘)’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(52) : error C2143:
syntax e
rror : missing ‘{’ before ‘
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(122) : error C2016: C
requi
res that a struct or union has at least one member
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(122) : error C2061:
syntax
error : identifier ‘ULONG’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(124) : error C2061:
syntax
error : identifier ‘FrameID’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(124) : error C2059:
syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(126) : error C2061:
syntax
error : identifier ‘NumberOfInstances’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(126) : error C2059:
syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(128) : error C2061:
syntax
error : identifier ‘FilterNameLength’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(128) : error C2059:
syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(129) : error C2061:
syntax
error : identifier ‘FilterNameBuffer’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(129) : error C2059:
syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(129) : error C3409:
empty a
ttribute block is not allowed
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(129) : error C2143:
syntax
error : missing ‘]’ before ‘constant’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(131) : error C2059:
syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(145) : error C2016: C
requi
res that a struct or union has at least one member
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(145) : error C2061:
syntax
error : identifier ‘ULONG’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(151) : error C2061:
syntax
error : identifier ‘Flags’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(151) : error C2059:
syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(163) : error C2016: C
requi
res that a struct or union has at least one member
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(163) : error C2061:
syntax
error : identifier ‘ULONG’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(165) : error C2061:
syntax
error : identifier ‘NumberOfInstances’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(165) : error C2059:
syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(167) : error C2061:
syntax
error : identifier ‘FilterNameLength’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(167) : error C2059:
syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(168) : error C2061:
syntax
error : identifier ‘FilterNameBufferOffset’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(168) : error C2059:
syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(170) : error C2061:
syntax
error : identifier ‘FilterAltitudeLength’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(170) : error C2059:
syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(171) : error C2061:
syntax
error : identifier ‘FilterAltitudeBufferOffset’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(171) : error C2059:
syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(173) : error C2059:
syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(181) : error C2016: C
requi
res that a struct or union has at least one member
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(181) : error C2061:
syntax
error : identifier ‘USHORT’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(182) : error C2061:
syntax
error : identifier ‘FilterNameBufferOffset’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(182) : error C2059:
syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(184) : error C2059:
syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(186) : error C2059:
syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(188) : error C2059:
syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(289) : error C2016: C
requi
res that a struct or union has at least one member
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(289) : error C2061:
syntax
error : identifier ‘USHORT’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(295) : error C2061:
syntax
error : identifier ‘FilterVolumeName’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(295) : error C2059:
syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(295) : error C3409:
empty a
ttribute block is not allowed
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(295) : error C2143:
syntax
error : missing ‘]’ before ‘constant’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(297) : error C2059:
syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(372) : error C2143:
syntax
error : missing ‘)’ before ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(372) : error C2143:
syntax
error : missing ‘{’ before ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(372) : error C2059:
syntax
error : ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(381) : error C2143:
syntax
error : missing ‘)’ before ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(381) : error C2143:
syntax
error : missing ‘{’ before ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(381) : error C2059:
syntax
error : ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(393) : error C2143:
syntax
error : missing ‘)’ before ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(393) : error C2143:
syntax
error : missing ‘{’ before ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(393) : error C2059:
syntax
error : ‘sizeof’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(554) : error C2016: C
requi
res that a struct or union has at least one member
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(554) : error C2061:
syntax
error : identifier ‘ULONG’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(564) : error C2061:
syntax
error : identifier ‘MessageId’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(564) : error C2059:
syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(570) : error C2059:
syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(581) : error C2016: C
requi
res that a struct or union has at least one member
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(581) : error C2061:
syntax
error : identifier ‘NTSTATUS’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(590) : error C2061:
syntax
error : identifier ‘MessageId’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(590) : error C2059:
syntax
error : ‘;’
1>c:\winddk\7600.16385.1\inc\ddk\fltuserstructures.h(596) : error C2059:
syntax
error : ‘}’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(83) : error C2061: syntax error :
ide
ntifier ‘HRESULT’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(83) : error C2059: syntax error :
’;‘

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(85) : error C2061: syntax error :
ide
ntifier ‘FilterLoad’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(85) : error C2059: syntax error :
’;‘

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(86) : error C2146: syntax error :
mis
sing ‘)’ before identifier ‘LPCWSTR’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(86) : error C2061: syntax error :
ide
ntifier ‘LPCWSTR’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(87) : error C2059: syntax error :
’)‘

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(90) : error C2061: syntax error :
ide
ntifier ‘HRESULT’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(90) : error C2059: syntax error :
’;‘

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(92) : error C2061: syntax error :
ide
ntifier ‘FilterUnload’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(92) : error C2059: syntax error :
’;‘

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(93) : error C2146: syntax error :
mis
sing ‘)’ before identifier ‘LPCWSTR’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(93) : error C2061: syntax error :
ide
ntifier ‘LPCWSTR’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(94) : error C2059: syntax error :
’)'

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(108) : error C2061: syntax error
: id
entifier ‘HRESULT’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(108) : error C2059: syntax error
: ‘;

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(110) : error C2061: syntax error
: id
entifier ‘FilterCreate’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(110) : error C2059: syntax error
: ‘;

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(111) : error C2146: syntax error
: mi
ssing ‘)’ before identifier ‘LPCWSTR’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(111) : error C2061: syntax error
: id
entifier ‘LPCWSTR’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(112) : error C2146: syntax error
: mi
ssing ‘;’ before identifier ‘HFILTER’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(112) : error C2143: syntax error
: mi
ssing ‘{’ before '

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(113) : error C2059: syntax error
: ‘)

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(116) : error C2061: syntax error
: id
entifier ‘WINAPI’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(116) : error C2059: syntax error
: ‘;

1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(118) : error C2146: syntax error
: mi
ssing ‘)’ before identifier ‘HFILTER’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(118) : error C2061: syntax error
: id
entifier ‘HFILTER’
1>c:\winddk\7600.16385.1\inc\ddk\fltuser.h(118) : error C1003: error count
excee
ds 100; stopping compilation
Linking Executable - objchk_wxp_x86\i386\wilh_chckd_build.sys
BUILD: Finish time: Sat Mar 26 23:44:23 2011
BUILD: Done

3 files compiled - 12 Warnings - 102 Errors
1 executable built -------------------------------------------> Why it
still builds, I don’t know.

C:\My_Drivers>
END LOG*****************


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

@Mark Roddy, that is what I had in mind, after seeing the error. Pavel provided a nice suggestion MSDN