Jump to content

help with some c code?


Recommended Posts

I'm attempting to compile some code with windows driver kit 7.1 for XP

the compiler output


cl Wdf01013.c

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.207 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

Wdf01013.c
C:\WinDDK\7600.16385.1\inc\api\defs.h(74) : warning C4005: 'LOBYTE' : macro redefinition
        C:\WinDDK\7600.16385.1\inc\api\windef.h(203) : see previous definition of 'LOBYTE'
C:\WinDDK\7600.16385.1\inc\api\defs.h(75) : warning C4005: 'LOWORD' : macro redefinition
        C:\WinDDK\7600.16385.1\inc\api\windef.h(201) : see previous definition of 'LOWORD'
C:\WinDDK\7600.16385.1\inc\api\defs.h(77) : warning C4005: 'HIBYTE' : macro redefinition
        C:\WinDDK\7600.16385.1\inc\api\windef.h(204) : see previous definition of 'HIBYTE'
C:\WinDDK\7600.16385.1\inc\api\defs.h(78) : warning C4005: 'HIWORD' : macro redefinition
        C:\WinDDK\7600.16385.1\inc\api\windef.h(202) : see previous definition of 'HIWORD'
Wdf01013.c(18) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(18) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(18) : error C2059: syntax error : ':'
Wdf01013.c(19) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(19) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(19) : error C2059: syntax error : ':'
Wdf01013.c(28) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(28) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(28) : error C2059: syntax error : ':'
Wdf01013.c(29) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(29) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(29) : error C2059: syntax error : ':'
Wdf01013.c(33) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(33) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(33) : error C2059: syntax error : ':'
Wdf01013.c(40) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(40) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(40) : error C2059: syntax error : ':'
Wdf01013.c(41) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(41) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(41) : error C2059: syntax error : ':'
Wdf01013.c(42) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(42) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(42) : error C2059: syntax error : ':'
Wdf01013.c(43) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(43) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(43) : error C2059: syntax error : ':'
Wdf01013.c(47) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(47) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(47) : error C2059: syntax error : ':'
Wdf01013.c(48) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(48) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(48) : error C2059: syntax error : ':'
Wdf01013.c(49) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(49) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(49) : error C2059: syntax error : ':'
Wdf01013.c(50) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(50) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(50) : error C2059: syntax error : ':'
Wdf01013.c(51) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(51) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(51) : error C2059: syntax error : ':'
Wdf01013.c(52) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(52) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(52) : error C2059: syntax error : ':'
Wdf01013.c(53) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(53) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(53) : error C2059: syntax error : ':'
Wdf01013.c(59) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(59) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(59) : error C2059: syntax error : ':'
Wdf01013.c(60) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(60) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(60) : error C2059: syntax error : ':'
Wdf01013.c(61) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(61) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(61) : error C2059: syntax error : ':'
Wdf01013.c(61) : error C2018: unknown character '0x60'
Wdf01013.c(61) : error C2001: newline in constant
Wdf01013.c(61) : error C2015: too many characters in constant
Wdf01013.c(63) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(63) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(63) : error C2059: syntax error : ':'
Wdf01013.c(69) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(69) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(69) : error C2059: syntax error : ':'
Wdf01013.c(70) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(70) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(70) : error C2059: syntax error : ':'
Wdf01013.c(71) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(71) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(71) : error C2059: syntax error : ':'
Wdf01013.c(73) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(73) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(73) : error C2059: syntax error : ':'
Wdf01013.c(74) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(74) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(74) : error C2059: syntax error : ':'
Wdf01013.c(75) : error C2143: syntax error : missing '{' before '*'
Wdf01013.c(75) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(75) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(75) : error C2059: syntax error : ':'
Wdf01013.c(76) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(76) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(76) : error C2059: syntax error : ':'
Wdf01013.c(77) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(77) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(77) : error C2059: syntax error : ':'
Wdf01013.c(78) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(78) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(78) : error C2059: syntax error : ':'
Wdf01013.c(79) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(79) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(79) : error C2059: syntax error : ':'
Wdf01013.c(80) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(80) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(80) : error C2059: syntax error : ':'
Wdf01013.c(83) : error C2059: syntax error : 'type'
Wdf01013.c(85) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(85) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(85) : error C2059: syntax error : ':'
Wdf01013.c(86) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(86) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(86) : error C2059: syntax error : ':'
Wdf01013.c(89) : error C2059: syntax error : 'type'
Wdf01013.c(90) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(90) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(90) : error C2059: syntax error : ':'
Wdf01013.c(91) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(91) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(91) : error C2059: syntax error : ':'
Wdf01013.c(92) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(92) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(92) : error C2059: syntax error : ':'
Wdf01013.c(96) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(96) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(96) : error C2059: syntax error : ':'
Wdf01013.c(97) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(97) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(97) : error C2059: syntax error : ':'
Wdf01013.c(98) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(98) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(98) : error C2059: syntax error : ':'
Wdf01013.c(99) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(99) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(99) : error C2059: syntax error : ':'
Wdf01013.c(100) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(100) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(100) : error C2059: syntax error : ':'
Wdf01013.c(105) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(105) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(105) : error C2059: syntax error : ':'
Wdf01013.c(106) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(106) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(106) : error C2059: syntax error : ':'
Wdf01013.c(107) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(107) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(107) : error C2059: syntax error : ':'
Wdf01013.c(107) : error C2018: unknown character '0x60'
Wdf01013.c(107) : error C2001: newline in constant
Wdf01013.c(107) : error C2015: too many characters in constant
Wdf01013.c(109) : error C2143: syntax error : missing '{' before '*'
Wdf01013.c(109) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(109) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(109) : error C2059: syntax error : ':'
Wdf01013.c(110) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(110) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(110) : fatal error C1003: error count exceeds 100; stopping compilation

here is the C code file

http://www.megafileupload.com/cv8f/Wdf01013.c

it's a decompiled sys file - I wanted to see if might be possible to get the generic USB 3.0 driver to work on XP

Link to comment
Share on other sites


It looks like you are getting syntax errors on the lines under the Function declaractions comment. The compiler stopped, but you should end up getting errors from line 18-2398, 2581-2994. I am thinking that whatever the output the decompiler gave you, is not ready for compilating in C++ as it says. I cannot identify the output, but I can compare to what a C++ Function Declaration is supposed to look like:

http://www.cplusplus.com/doc/tutorial/functions/

Link to comment
Share on other sites

  • 2 years later...
On 1/25/2017 at 10:58 AM, Damnation said:

I'm attempting to compile some code with windows driver kit 7.1 for XP

the compiler output Pnr Status TextNow VPN


cl Wdf01013.c

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.207 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

Wdf01013.c
C:\WinDDK\7600.16385.1\inc\api\defs.h(74) : warning C4005: 'LOBYTE' : macro redefinition
        C:\WinDDK\7600.16385.1\inc\api\windef.h(203) : see previous definition of 'LOBYTE'
C:\WinDDK\7600.16385.1\inc\api\defs.h(75) : warning C4005: 'LOWORD' : macro redefinition
        C:\WinDDK\7600.16385.1\inc\api\windef.h(201) : see previous definition of 'LOWORD'
C:\WinDDK\7600.16385.1\inc\api\defs.h(77) : warning C4005: 'HIBYTE' : macro redefinition
        C:\WinDDK\7600.16385.1\inc\api\windef.h(204) : see previous definition of 'HIBYTE'
C:\WinDDK\7600.16385.1\inc\api\defs.h(78) : warning C4005: 'HIWORD' : macro redefinition
        C:\WinDDK\7600.16385.1\inc\api\windef.h(202) : see previous definition of 'HIWORD'
Wdf01013.c(18) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(18) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(18) : error C2059: syntax error : ':'
Wdf01013.c(19) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(19) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(19) : error C2059: syntax error : ':'
Wdf01013.c(28) : warning C4229: anachronism used : modifiers on data are ignored
Wdf01013.c(28) : error C2143: syntax error : missing '{' before ':'
Wdf01013.c(28) : error C2059: syntax error : ':'

here is the C code file

http://www.megafileupload.com/cv8f/Wdf01013.c

it's a decompiled sys file - I wanted to see if might be possible to get the generic USB 3.0 driver to work on XP

That's a lot of syntax errors.

But,from what I see given that I can not access the source code, it may be a c++ file not a c file.

In C, we do not use alot oof ":" but in C++ it's largely used in OO part of the language.

Edited by nour
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...