Join 149,939 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,429 people online right now. Registration is fast and FREE... Join Now!
You can't just download the winddk.h header file and use it. winddk.h uses many other header files as well, so unless you download them all, you wont be able to do anything with it.
winddk.h is a part of Microsoft's WDK (Windows Driver Kit - previously Windows DDK(Driver Development Kit)) Download the WDK (or the DDK, I still use that) and then compile your program.
// Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here if (IsPwrHibernateAllowed() = TRUE) { m_temp="This PC Supports Hibernation!"; } else { m_temp="This PC Doesn't support Hibernation"; } return TRUE; // return TRUE unless you set the focus to a control }
// If you add a minimize button to your dialog, you will need the code below // to draw the icon. For MFC applications using the document/view model, // this is automatically done for you by the framework.
void CTestDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this); // device context for painting
// Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon dc.DrawIcon(x, y, m_hIcon); } else { CDialog::OnPaint(); } }
// The system calls this to obtain the cursor to display while the user drags // the minimized window. HCURSOR CTestDlg::OnQueryDragIcon() { return (HCURSOR) m_hIcon; }
I get all these Errors:
CODE
c:\program files\microsoft visual studio\vc98\include\powrprof.h(27) : error C2146: syntax error : missing ';' before identifier 'LidOpenWakeAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(27) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(27) : error C2501: 'LidOpenWakeAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(28) : error C2146: syntax error : missing ';' before identifier 'LidOpenWakeDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(28) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(28) : error C2501: 'LidOpenWakeDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(34) : error C2146: syntax error : missing ';' before identifier 'PowerButtonAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(34) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(34) : error C2501: 'PowerButtonAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(35) : error C2146: syntax error : missing ';' before identifier 'PowerButtonDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(35) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(35) : error C2501: 'PowerButtonDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(36) : error C2146: syntax error : missing ';' before identifier 'SleepButtonAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(36) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(36) : error C2501: 'SleepButtonAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(37) : error C2146: syntax error : missing ';' before identifier 'SleepButtonDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(37) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(37) : error C2501: 'SleepButtonDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(38) : error C2146: syntax error : missing ';' before identifier 'LidCloseAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(38) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(38) : error C2501: 'LidCloseAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(39) : error C2146: syntax error : missing ';' before identifier 'LidCloseDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(39) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(39) : error C2501: 'LidCloseDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(40) : error C2146: syntax error : missing ';' before identifier 'DischargePolicy' c:\program files\microsoft visual studio\vc98\include\powrprof.h(40) : error C2501: 'SYSTEM_POWER_LEVEL' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(40) : error C2065: 'NUM_DISCHARGE_POLICIES' : undeclared identifier c:\program files\microsoft visual studio\vc98\include\powrprof.h(40) : error C2057: expected constant expression c:\program files\microsoft visual studio\vc98\include\powrprof.h(40) : error C2501: 'DischargePolicy' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(62) : error C2146: syntax error : missing ';' before identifier 'MinSleepAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(62) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(62) : error C2501: 'MinSleepAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(63) : error C2146: syntax error : missing ';' before identifier 'MinSleepDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(63) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(63) : error C2501: 'MinSleepDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(64) : error C2146: syntax error : missing ';' before identifier 'ReducedLatencySleepAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(64) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(64) : error C2501: 'ReducedLatencySleepAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(65) : error C2146: syntax error : missing ';' before identifier 'ReducedLatencySleepDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(65) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(65) : error C2501: 'ReducedLatencySleepDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(77) : error C2146: syntax error : missing ';' before identifier 'OverThrottledAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(77) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(77) : error C2501: 'OverThrottledAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(78) : error C2146: syntax error : missing ';' before identifier 'OverThrottledDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(78) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(78) : error C2501: 'OverThrottledDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(90) : error C2146: syntax error : missing ';' before identifier 'ProcessorPolicyAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(90) : error C2501: 'PROCESSOR_POWER_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(90) : error C2501: 'ProcessorPolicyAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(91) : error C2146: syntax error : missing ';' before identifier 'ProcessorPolicyDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(91) : error C2501: 'PROCESSOR_POWER_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(91) : error C2501: 'ProcessorPolicyDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(101) : error C2146: syntax error : missing ';' before identifier 'IdleAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(101) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(101) : error C2501: 'IdleAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(102) : error C2146: syntax error : missing ';' before identifier 'IdleDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(102) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(102) : error C2501: 'IdleDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(113) : error C2146: syntax error : missing ';' before identifier 'MaxSleepAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(113) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(113) : error C2501: 'MaxSleepAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(114) : error C2146: syntax error : missing ';' before identifier 'MaxSleepDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(114) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(114) : error C2501: 'MaxSleepDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(170) : error C2065: 'POWER_ACTION' : undeclared identifier c:\program files\microsoft visual studio\vc98\include\powrprof.h(170) : error C2065: 'SYSTEM_POWER_STATE' : undeclared identifier c:\program files\microsoft visual studio\vc98\include\powrprof.h(170) : error C2275: 'ULONG' : illegal use of this type as an expression c:\program files\microsoft visual studio\vc98\include\windef.h(43) : see declaration of 'ULONG' c:\program files\microsoft visual studio\vc98\include\powrprof.h(170) : error C2275: 'BOOLEAN' : illegal use of this type as an expression c:\program files\microsoft visual studio\vc98\include\winnt.h(636) : see declaration of 'BOOLEAN' c:\program files\microsoft visual studio\vc98\include\powrprof.h(170) : error C2165: 'left-side modifier' : cannot modify pointers to data c:\program files\microsoft visual studio\vc98\include\powrprof.h(170) : error C2071: 'PFNNTINITIATEPWRACTION' : illegal storage class c:\program files\microsoft visual studio\vc98\include\powrprof.h(177) : error C2065: '__out' : undeclared identifier c:\program files\microsoft visual studio\vc98\include\powrprof.h(177) : error C2146: syntax error : missing ')' before identifier 'PUINT' c:\program files\microsoft visual studio\vc98\include\powrprof.h(177) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(179) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(184) : error C2065: '__in' : undeclared identifier c:\program files\microsoft visual studio\vc98\include\powrprof.h(184) : error C2146: syntax error : missing ')' before identifier 'PWRSCHEMESENUMPROC' c:\program files\microsoft visual studio\vc98\include\powrprof.h(184) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(186) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(190) : error C2146: syntax error : missing ')' before identifier 'PGLOBAL_POWER_POLICY' c:\program files\microsoft visual studio\vc98\include\powrprof.h(190) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(191) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(196) : error C2146: syntax error : missing ')' before identifier 'UINT' c:\program files\microsoft visual studio\vc98\include\powrprof.h(196) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(198) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(203) : error C2146: syntax error : missing ')' before identifier 'PUINT' c:\program files\microsoft visual studio\vc98\include\powrprof.h(203) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(207) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(212) : error C2146: syntax error : missing ')' before identifier 'PGLOBAL_POWER_POLICY' c:\program files\microsoft visual studio\vc98\include\powrprof.h(212) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(213) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(218) : error C2146: syntax error : missing ')' before identifier 'UINT' c:\program files\microsoft visual studio\vc98\include\powrprof.h(218) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(219) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(224) : error C2146: syntax error : missing ')' before identifier 'PUINT' c:\program files\microsoft visual studio\vc98\include\powrprof.h(224) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(225) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(230) : error C2146: syntax error : missing ')' before identifier 'UINT' c:\program files\microsoft visual studio\vc98\include\powrprof.h(230) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(233) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(238) : error C2146: syntax error : missing ')' before identifier 'PSYSTEM_POWER_CAPABILITIES' c:\program files\microsoft visual studio\vc98\include\powrprof.h(238) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(239) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(262) : error C2146: syntax error : missing ')' before identifier 'PADMINISTRATOR_POWER_POLICY' c:\program files\microsoft visual studio\vc98\include\powrprof.h(262) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(263) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(268) : error C2146: syntax error : missing ')' before identifier 'BOOLEAN' c:\program files\microsoft visual studio\vc98\include\powrprof.h(268) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(271) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(276) : error C2146: syntax error : missing ')' before identifier 'PGLOBAL_POWER_POLICY' c:\program files\microsoft visual studio\vc98\include\powrprof.h(276) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(278) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(294) : error C2146: syntax error : missing ')' before identifier 'UINT' c:\program files\microsoft visual studio\vc98\include\powrprof.h(294) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(296) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(296) : fatal error C1003: error count exceeds 100; stopping compilation Error executing cl.exe.
test.exe - 102 error(s), 14 warning(s)
and i have PowrProf.dll in the root of my porject.
This post has been edited by AntiBNI: 2 Jan, 2008 - 07:17 AM
// Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here if (IsPwrHibernateAllowed() = TRUE) { m_temp="This PC Supports Hibernation!"; } else { m_temp="This PC Doesn't support Hibernation"; } return TRUE; // return TRUE unless you set the focus to a control }
// If you add a minimize button to your dialog, you will need the code below // to draw the icon. For MFC applications using the document/view model, // this is automatically done for you by the framework.
void CTestDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this); // device context for painting
// Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon dc.DrawIcon(x, y, m_hIcon); } else { CDialog::OnPaint(); } }
// The system calls this to obtain the cursor to display while the user drags // the minimized window. HCURSOR CTestDlg::OnQueryDragIcon() { return (HCURSOR) m_hIcon; }
I get all these Errors:
CODE
c:\program files\microsoft visual studio\vc98\include\powrprof.h(27) : error C2146: syntax error : missing ';' before identifier 'LidOpenWakeAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(27) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(27) : error C2501: 'LidOpenWakeAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(28) : error C2146: syntax error : missing ';' before identifier 'LidOpenWakeDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(28) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(28) : error C2501: 'LidOpenWakeDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(34) : error C2146: syntax error : missing ';' before identifier 'PowerButtonAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(34) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(34) : error C2501: 'PowerButtonAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(35) : error C2146: syntax error : missing ';' before identifier 'PowerButtonDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(35) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(35) : error C2501: 'PowerButtonDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(36) : error C2146: syntax error : missing ';' before identifier 'SleepButtonAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(36) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(36) : error C2501: 'SleepButtonAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(37) : error C2146: syntax error : missing ';' before identifier 'SleepButtonDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(37) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(37) : error C2501: 'SleepButtonDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(38) : error C2146: syntax error : missing ';' before identifier 'LidCloseAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(38) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(38) : error C2501: 'LidCloseAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(39) : error C2146: syntax error : missing ';' before identifier 'LidCloseDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(39) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(39) : error C2501: 'LidCloseDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(40) : error C2146: syntax error : missing ';' before identifier 'DischargePolicy' c:\program files\microsoft visual studio\vc98\include\powrprof.h(40) : error C2501: 'SYSTEM_POWER_LEVEL' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(40) : error C2065: 'NUM_DISCHARGE_POLICIES' : undeclared identifier c:\program files\microsoft visual studio\vc98\include\powrprof.h(40) : error C2057: expected constant expression c:\program files\microsoft visual studio\vc98\include\powrprof.h(40) : error C2501: 'DischargePolicy' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(62) : error C2146: syntax error : missing ';' before identifier 'MinSleepAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(62) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(62) : error C2501: 'MinSleepAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(63) : error C2146: syntax error : missing ';' before identifier 'MinSleepDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(63) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(63) : error C2501: 'MinSleepDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(64) : error C2146: syntax error : missing ';' before identifier 'ReducedLatencySleepAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(64) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(64) : error C2501: 'ReducedLatencySleepAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(65) : error C2146: syntax error : missing ';' before identifier 'ReducedLatencySleepDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(65) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(65) : error C2501: 'ReducedLatencySleepDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(77) : error C2146: syntax error : missing ';' before identifier 'OverThrottledAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(77) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(77) : error C2501: 'OverThrottledAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(78) : error C2146: syntax error : missing ';' before identifier 'OverThrottledDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(78) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(78) : error C2501: 'OverThrottledDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(90) : error C2146: syntax error : missing ';' before identifier 'ProcessorPolicyAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(90) : error C2501: 'PROCESSOR_POWER_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(90) : error C2501: 'ProcessorPolicyAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(91) : error C2146: syntax error : missing ';' before identifier 'ProcessorPolicyDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(91) : error C2501: 'PROCESSOR_POWER_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(91) : error C2501: 'ProcessorPolicyDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(101) : error C2146: syntax error : missing ';' before identifier 'IdleAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(101) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(101) : error C2501: 'IdleAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(102) : error C2146: syntax error : missing ';' before identifier 'IdleDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(102) : error C2501: 'POWER_ACTION_POLICY' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(102) : error C2501: 'IdleDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(113) : error C2146: syntax error : missing ';' before identifier 'MaxSleepAc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(113) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(113) : error C2501: 'MaxSleepAc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(114) : error C2146: syntax error : missing ';' before identifier 'MaxSleepDc' c:\program files\microsoft visual studio\vc98\include\powrprof.h(114) : error C2501: 'SYSTEM_POWER_STATE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(114) : error C2501: 'MaxSleepDc' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\powrprof.h(170) : error C2065: 'POWER_ACTION' : undeclared identifier c:\program files\microsoft visual studio\vc98\include\powrprof.h(170) : error C2065: 'SYSTEM_POWER_STATE' : undeclared identifier c:\program files\microsoft visual studio\vc98\include\powrprof.h(170) : error C2275: 'ULONG' : illegal use of this type as an expression c:\program files\microsoft visual studio\vc98\include\windef.h(43) : see declaration of 'ULONG' c:\program files\microsoft visual studio\vc98\include\powrprof.h(170) : error C2275: 'BOOLEAN' : illegal use of this type as an expression c:\program files\microsoft visual studio\vc98\include\winnt.h(636) : see declaration of 'BOOLEAN' c:\program files\microsoft visual studio\vc98\include\powrprof.h(170) : error C2165: 'left-side modifier' : cannot modify pointers to data c:\program files\microsoft visual studio\vc98\include\powrprof.h(170) : error C2071: 'PFNNTINITIATEPWRACTION' : illegal storage class c:\program files\microsoft visual studio\vc98\include\powrprof.h(177) : error C2065: '__out' : undeclared identifier c:\program files\microsoft visual studio\vc98\include\powrprof.h(177) : error C2146: syntax error : missing ')' before identifier 'PUINT' c:\program files\microsoft visual studio\vc98\include\powrprof.h(177) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(179) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(184) : error C2065: '__in' : undeclared identifier c:\program files\microsoft visual studio\vc98\include\powrprof.h(184) : error C2146: syntax error : missing ')' before identifier 'PWRSCHEMESENUMPROC' c:\program files\microsoft visual studio\vc98\include\powrprof.h(184) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(186) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(190) : error C2146: syntax error : missing ')' before identifier 'PGLOBAL_POWER_POLICY' c:\program files\microsoft visual studio\vc98\include\powrprof.h(190) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(191) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(196) : error C2146: syntax error : missing ')' before identifier 'UINT' c:\program files\microsoft visual studio\vc98\include\powrprof.h(196) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(198) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(203) : error C2146: syntax error : missing ')' before identifier 'PUINT' c:\program files\microsoft visual studio\vc98\include\powrprof.h(203) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(207) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(212) : error C2146: syntax error : missing ')' before identifier 'PGLOBAL_POWER_POLICY' c:\program files\microsoft visual studio\vc98\include\powrprof.h(212) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(213) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(218) : error C2146: syntax error : missing ')' before identifier 'UINT' c:\program files\microsoft visual studio\vc98\include\powrprof.h(218) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(219) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(224) : error C2146: syntax error : missing ')' before identifier 'PUINT' c:\program files\microsoft visual studio\vc98\include\powrprof.h(224) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(225) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(230) : error C2146: syntax error : missing ')' before identifier 'UINT' c:\program files\microsoft visual studio\vc98\include\powrprof.h(230) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(233) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(238) : error C2146: syntax error : missing ')' before identifier 'PSYSTEM_POWER_CAPABILITIES' c:\program files\microsoft visual studio\vc98\include\powrprof.h(238) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(239) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(262) : error C2146: syntax error : missing ')' before identifier 'PADMINISTRATOR_POWER_POLICY' c:\program files\microsoft visual studio\vc98\include\powrprof.h(262) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(263) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(268) : error C2146: syntax error : missing ')' before identifier 'BOOLEAN' c:\program files\microsoft visual studio\vc98\include\powrprof.h(268) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(271) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(276) : error C2146: syntax error : missing ')' before identifier 'PGLOBAL_POWER_POLICY' c:\program files\microsoft visual studio\vc98\include\powrprof.h(276) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(278) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(294) : error C2146: syntax error : missing ')' before identifier 'UINT' c:\program files\microsoft visual studio\vc98\include\powrprof.h(294) : warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft visual studio\vc98\include\powrprof.h(296) : error C2059: syntax error : ')' c:\program files\microsoft visual studio\vc98\include\powrprof.h(296) : fatal error C1003: error count exceeds 100; stopping compilation Error executing cl.exe.
test.exe - 102 error(s), 14 warning(s)
i don't know whats wrong or why is behaving like that.
This post has been edited by AntiBNI: 2 Jan, 2008 - 05:54 PM
*Topics Merged* Please do not create a new thread for the same question
It looks like header files missing, have you included all of the header files to the compiler? Perhaps the .h files you are using require others that you have missed.