Discussion:
Discovery of PMI-Compliant Power Meter Devices
(too old to reply)
Javier Càceres
2010-09-06 13:44:03 UTC
Permalink
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/library/ff543833(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>
Javier Càceres
2010-09-09 19:18:06 UTC
Permalink
Does anybody see this forum?
Post by Javier Càceres
Hi there,
I'm using the methods SetupDiEnumDeviceInterfaces and
SetupDiGetDeviceInterfaceDetail as described in following sample to discover
http://msdn.microsoft.com/en-us/library/ff543833(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).
-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
C:\XXX\Driver>build
BUILD: Compile and Link for AMD64
BUILD: Loading c:\winddk\7600.16385.1\build.dat...
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
iden
tifier 'PROPSHEETPAGE_RESOURCE'
';'
iden
tifier 'PROPSHEETPAGE_RESOURCE'
'}'
iden
tifier 'pfnDlgProc'
';'
'}'
miss
ing '{' before '*'
iden
tifier 'PROPSHEETPAGE_RESOURCE'
'}'
iden
tifier 'pfnDlgProc'
';'
'}'
miss
ing '{' before '*'
iden
tifier 'PROPSHEETPAGE_RESOURCE'
'}'
iden
tifier 'pfnDlgProc'
';'
'}'
miss
ing '{' before '*'
iden
tifier 'PROPSHEETPAGE_RESOURCE'
'}'
iden
tifier 'pfnDlgProc'
';'
'}'
miss
ing '{' before '*'
iden
tifier 'PROPSHEETPAGE_RESOURCE'
'}'
redefi
nition; different basic types
iden
tifier 'pfnDlgProc'
';'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(244) : error C4028: formal
parameter 3
different from declaration
'}'
miss
ing '{' before '*'
iden
tifier 'PROPSHEETPAGE_RESOURCE'
'}'
redefi
nition; different basic types
iden
tifier 'pfnDlgProc'
';'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(250) : error C4028: formal
parameter 3
different from declaration
redefinition; different basic types
'pszHeaderSubTitle'
: redefinition; different basic types
'}'
miss
ing '{' before '*'
iden
tifier 'PROPSHEETPAGE_RESOURCE'
'}'
redefi
nition; different basic types
iden
tifier 'pfnDlgProc'
';'
1>c:\winddk\7600.16385.1\inc\api\prsht.h(259) : error C4028: formal
parameter 3
different from declaration
redefinition; different basic types
'pszHeaderSubTitle'
: redefinition; different basic types
'}'
miss
ing '{' before '*'
iden
tifier 'PROPSHEETPAGE_RESOURCE'
'}'
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>
Loading...