Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Discovery of PMI-Compliant Power Meter Devices

Reply
Thread Tools Display Modes

Discovery of PMI-Compliant Power Meter Devices

 
 
Javier Càceres
Guest
Posts: n/a

 
      09-06-2010
Hi there,

I'm using the methods SetupDiEnumDeviceInterfaces and
SetupDiGetDeviceInterfaceDetail as described in following sample to discover
PMI-Compliant Power Meter Devices:
http://msdn.microsoft.com/en-us/libr...33(VS.85).aspx
And I'm getting 57 errors when compiling in the Win7 x64 build enviroment (I
have also tried with the x86 enviroment).

I have this enviroment:
-WDK 7600.16385.1
-Widows SDK v7.0
-Windows 7 (x64)

I'm including these headers: Setupapi.h and Pmi.h. Any help?. These are the
errors:

C:\XXX\Driver>build
BUILD: Compile and Link for AMD64
BUILD: Loading c:\winddk\7600.16385.1\build.dat...
BUILD: Computing Include file dependencies:
BUILD: Start time: Mon Sep 06 08:37:52 2010
BUILD: Examining c:\XXX\driver directory for files to compile.
BUILD: Saving c:\winddk\7600.16385.1\build.dat...
BUILD: Compiling and Linking c:\XXX\driver directory
Configuring OACR for 'root:amd64chk' - <OACR on>
Compiling - powerdriver.c
1>errors in directory c:\XXX\driver
1>c:\winddk\7600.16385.1\inc\api\prsht.h(137) : error C2061: syntax error :
iden
tifier 'PROPSHEETPAGE_RESOURCE'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(137) : error C2059: syntax error :
';'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(198) : error C2061: syntax error :
iden
tifier 'PROPSHEETPAGE_RESOURCE'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(198) : error C2059: syntax error :
'}'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(198) : error C2061: syntax error :
iden
tifier 'pfnDlgProc'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(198) : error C2059: syntax error :
';'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(199) : error C2059: syntax error :
'}'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(200) : error C2143: syntax error :
miss
ing '{' before '*'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(204) : error C2061: syntax error :
iden
tifier 'PROPSHEETPAGE_RESOURCE'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(204) : error C2059: syntax error :
'}'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(204) : error C2061: syntax error :
iden
tifier 'pfnDlgProc'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(204) : error C2059: syntax error :
';'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(208) : error C2059: syntax error :
'}'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(209) : error C2143: syntax error :
miss
ing '{' before '*'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(213) : error C2061: syntax error :
iden
tifier 'PROPSHEETPAGE_RESOURCE'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(213) : error C2059: syntax error :
'}'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(213) : error C2061: syntax error :
iden
tifier 'pfnDlgProc'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(213) : error C2059: syntax error :
';'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(219) : error C2059: syntax error :
'}'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(220) : error C2143: syntax error :
miss
ing '{' before '*'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(225) : error C2061: syntax error :
iden
tifier 'PROPSHEETPAGE_RESOURCE'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(225) : error C2059: syntax error :
'}'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(225) : error C2061: syntax error :
iden
tifier 'pfnDlgProc'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(225) : error C2059: syntax error :
';'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(238) : error C2059: syntax error :
'}'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(239) : error C2143: syntax error :
miss
ing '{' before '*'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(244) : error C2061: syntax error :
iden
tifier 'PROPSHEETPAGE_RESOURCE'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(244) : error C2059: syntax error :
'}'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(244) : error C2371: 'pszTitle' :
redefi
nition; different basic types
1>c:\winddk\7600.16385.1\inc\api\prsht.h(244) : error C2061: syntax error :
iden
tifier 'pfnDlgProc'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(244) : error C2059: syntax error :
';'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(244) : error C4028: formal
parameter 3
different from declaration
1>c:\winddk\7600.16385.1\inc\api\prsht.h(245) : error C2059: syntax error :
'}'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(246) : error C2143: syntax error :
miss
ing '{' before '*'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(250) : error C2061: syntax error :
iden
tifier 'PROPSHEETPAGE_RESOURCE'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(250) : error C2059: syntax error :
'}'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(250) : error C2371: 'pszTitle' :
redefi
nition; different basic types
1>c:\winddk\7600.16385.1\inc\api\prsht.h(250) : error C2061: syntax error :
iden
tifier 'pfnDlgProc'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(250) : error C2059: syntax error :
';'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(250) : error C4028: formal
parameter 3
different from declaration
1>c:\winddk\7600.16385.1\inc\api\prsht.h(252) : error C2371:
'pszHeaderTitle' :
redefinition; different basic types
1>c:\winddk\7600.16385.1\inc\api\prsht.h(253) : error C2371:
'pszHeaderSubTitle'
: redefinition; different basic types
1>c:\winddk\7600.16385.1\inc\api\prsht.h(254) : error C2059: syntax error :
'}'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(255) : error C2143: syntax error :
miss
ing '{' before '*'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(259) : error C2061: syntax error :
iden
tifier 'PROPSHEETPAGE_RESOURCE'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(259) : error C2059: syntax error :
'}'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(259) : error C2371: 'pszTitle' :
redefi
nition; different basic types
1>c:\winddk\7600.16385.1\inc\api\prsht.h(259) : error C2061: syntax error :
iden
tifier 'pfnDlgProc'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(259) : error C2059: syntax error :
';'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(259) : error C4028: formal
parameter 3
different from declaration
1>c:\winddk\7600.16385.1\inc\api\prsht.h(261) : error C2371:
'pszHeaderTitle' :
redefinition; different basic types
1>c:\winddk\7600.16385.1\inc\api\prsht.h(262) : error C2371:
'pszHeaderSubTitle'
: redefinition; different basic types
1>c:\winddk\7600.16385.1\inc\api\prsht.h(265) : error C2059: syntax error :
'}'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(266) : error C2143: syntax error :
miss
ing '{' before '*'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(271) : error C2061: syntax error :
iden
tifier 'PROPSHEETPAGE_RESOURCE'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(271) : error C2059: syntax error :
'}'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(271) : error C1046: compiler limit
: un
ion nested too deeply
Linking Executable - objchk_win7_amd64\amd64\XXX.sys
1>link : error LNK1181: cannot open input file 'c:\XXX.obj'
BUILD: Finish time: Mon Sep 06 08:37:58 2010
BUILD: Done

3 files compiled - 8 Warnings - 57 Errors - 601 LPS
1 executable built - 1 Error

C:\XXX\Driver>


 
Reply With Quote
 
 
 
 
Javier Càceres
Guest
Posts: n/a

 
      09-09-2010
Does anybody see this forum?

"Javier CÃ*ceres" wrote:

> Hi there,
>
> I'm using the methods SetupDiEnumDeviceInterfaces and
> SetupDiGetDeviceInterfaceDetail as described in following sample to discover
> PMI-Compliant Power Meter Devices:
> http://msdn.microsoft.com/en-us/libr...33(VS.85).aspx
> And I'm getting 57 errors when compiling in the Win7 x64 build enviroment (I
> have also tried with the x86 enviroment).
>
> I have this enviroment:
> -WDK 7600.16385.1
> -Widows SDK v7.0
> -Windows 7 (x64)
>
> I'm including these headers: Setupapi.h and Pmi.h. Any help?. These are the
> errors:
>
> C:\XXX\Driver>build
> BUILD: Compile and Link for AMD64
> BUILD: Loading c:\winddk\7600.16385.1\build.dat...
> BUILD: Computing Include file dependencies:
> BUILD: Start time: Mon Sep 06 08:37:52 2010
> BUILD: Examining c:\XXX\driver directory for files to compile.
> BUILD: Saving c:\winddk\7600.16385.1\build.dat...
> BUILD: Compiling and Linking c:\XXX\driver directory
> Configuring OACR for 'root:amd64chk' - <OACR on>
> Compiling - powerdriver.c
> 1>errors in directory c:\XXX\driver
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(137) : error C2061: syntax error :
> iden
> tifier 'PROPSHEETPAGE_RESOURCE'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(137) : error C2059: syntax error :
> ';'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(198) : error C2061: syntax error :
> iden
> tifier 'PROPSHEETPAGE_RESOURCE'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(198) : error C2059: syntax error :
> '}'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(198) : error C2061: syntax error :
> iden
> tifier 'pfnDlgProc'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(198) : error C2059: syntax error :
> ';'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(199) : error C2059: syntax error :
> '}'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(200) : error C2143: syntax error :
> miss
> ing '{' before '*'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(204) : error C2061: syntax error :
> iden
> tifier 'PROPSHEETPAGE_RESOURCE'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(204) : error C2059: syntax error :
> '}'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(204) : error C2061: syntax error :
> iden
> tifier 'pfnDlgProc'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(204) : error C2059: syntax error :
> ';'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(208) : error C2059: syntax error :
> '}'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(209) : error C2143: syntax error :
> miss
> ing '{' before '*'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(213) : error C2061: syntax error :
> iden
> tifier 'PROPSHEETPAGE_RESOURCE'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(213) : error C2059: syntax error :
> '}'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(213) : error C2061: syntax error :
> iden
> tifier 'pfnDlgProc'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(213) : error C2059: syntax error :
> ';'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(219) : error C2059: syntax error :
> '}'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(220) : error C2143: syntax error :
> miss
> ing '{' before '*'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(225) : error C2061: syntax error :
> iden
> tifier 'PROPSHEETPAGE_RESOURCE'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(225) : error C2059: syntax error :
> '}'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(225) : error C2061: syntax error :
> iden
> tifier 'pfnDlgProc'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(225) : error C2059: syntax error :
> ';'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(238) : error C2059: syntax error :
> '}'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(239) : error C2143: syntax error :
> miss
> ing '{' before '*'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(244) : error C2061: syntax error :
> iden
> tifier 'PROPSHEETPAGE_RESOURCE'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(244) : error C2059: syntax error :
> '}'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(244) : error C2371: 'pszTitle' :
> redefi
> nition; different basic types
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(244) : error C2061: syntax error :
> iden
> tifier 'pfnDlgProc'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(244) : error C2059: syntax error :
> ';'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(244) : error C4028: formal
> parameter 3
> different from declaration
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(245) : error C2059: syntax error :
> '}'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(246) : error C2143: syntax error :
> miss
> ing '{' before '*'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(250) : error C2061: syntax error :
> iden
> tifier 'PROPSHEETPAGE_RESOURCE'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(250) : error C2059: syntax error :
> '}'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(250) : error C2371: 'pszTitle' :
> redefi
> nition; different basic types
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(250) : error C2061: syntax error :
> iden
> tifier 'pfnDlgProc'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(250) : error C2059: syntax error :
> ';'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(250) : error C4028: formal
> parameter 3
> different from declaration
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(252) : error C2371:
> 'pszHeaderTitle' :
> redefinition; different basic types
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(253) : error C2371:
> 'pszHeaderSubTitle'
> : redefinition; different basic types
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(254) : error C2059: syntax error :
> '}'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(255) : error C2143: syntax error :
> miss
> ing '{' before '*'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(259) : error C2061: syntax error :
> iden
> tifier 'PROPSHEETPAGE_RESOURCE'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(259) : error C2059: syntax error :
> '}'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(259) : error C2371: 'pszTitle' :
> redefi
> nition; different basic types
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(259) : error C2061: syntax error :
> iden
> tifier 'pfnDlgProc'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(259) : error C2059: syntax error :
> ';'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(259) : error C4028: formal
> parameter 3
> different from declaration
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(261) : error C2371:
> 'pszHeaderTitle' :
> redefinition; different basic types
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(262) : error C2371:
> 'pszHeaderSubTitle'
> : redefinition; different basic types
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(265) : error C2059: syntax error :
> '}'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(266) : error C2143: syntax error :
> miss
> ing '{' before '*'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(271) : error C2061: syntax error :
> iden
> tifier 'PROPSHEETPAGE_RESOURCE'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(271) : error C2059: syntax error :
> '}'
> 1>c:\winddk\7600.16385.1\inc\api\prsht.h(271) : error C1046: compiler limit
> : un
> ion nested too deeply
> Linking Executable - objchk_win7_amd64\amd64\XXX.sys
> 1>link : error LNK1181: cannot open input file 'c:\XXX.obj'
> BUILD: Finish time: Mon Sep 06 08:37:58 2010
> BUILD: Done
>
> 3 files compiled - 8 Warnings - 57 Errors - 601 LPS
> 1 executable built - 1 Error
>
> C:\XXX\Driver>
>
>

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble installing Windows XP SP3 and other MS updates DanP Windows Update 27 08-18-2010 09:34 PM
Weird Network Discovery Reset Problem! Ray Windows Vista Installation 5 10-07-2009 01:33 PM
APC PowerChute estoad2 Windows Vista Hardware 13 07-22-2008 03:59 PM
Weird Network Discovery Reset Problem! Ray Windows Vista File Management 0 11-14-2007 03:19 AM
Stop 0x0000007b at end of Install BobMiller Windows Vista Installation 2 08-03-2006 06:52 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59