<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'urgent help vs2008 build errors' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'urgent help vs2008 build errors' posted on the 'Visual C++' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 18 May 2013 03:34:00 -0700</pubDate>
    <lastBuildDate>Sat, 18 May 2013 03:34:00 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>urgent help vs2008 build errors</title>
      <link>http://www.programmersheaven.com/mb/vcpage/430215/430215/urgent-help-vs2008-build-errors/</link>
      <description>I face errors while compiling code shown below. it gives unexpected errors..what could be the reason?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#define _WIN32_WINNT 0x0602&lt;br /&gt;
#include &amp;lt;Windows.h&amp;gt;&lt;br /&gt;
#include &amp;lt;powrprof.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;tchar.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#pragma comment(lib, "PowrProf.lib")&lt;br /&gt;
&lt;br /&gt;
static ULONG isConnectedStandby(PVOID Context, ULONG Type, PVOID Setting);&lt;br /&gt;
&lt;br /&gt;
ULONG isConnectedStandby(PVOID Context, ULONG Type, PVOID Setting)&lt;br /&gt;
{&lt;br /&gt;
       switch(Type)&lt;br /&gt;
       {&lt;br /&gt;
       case PBT_APMSUSPEND:&lt;br /&gt;
           printf( "PBT_APMSUSPEND");&lt;br /&gt;
              break;&lt;br /&gt;
       case PBT_APMRESUMESUSPEND:&lt;br /&gt;
           printf( "PBT_APMRESUMESUSPEND");&lt;br /&gt;
              break;&lt;br /&gt;
       case PBT_APMRESUMEAUTOMATIC:&lt;br /&gt;
           printf( "PBT_APMRESUMEAUTOMATIC");&lt;br /&gt;
              break;&lt;br /&gt;
       default:&lt;br /&gt;
           printf( "DEFAULT");&lt;br /&gt;
              break;&lt;br /&gt;
       }&lt;br /&gt;
       return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
static   _DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS testCallback = {&lt;br /&gt;
              isConnectedStandby,&lt;br /&gt;
              nullptr&lt;br /&gt;
              };&lt;br /&gt;
              &lt;br /&gt;
&lt;br /&gt;
int __cdecl main()&lt;br /&gt;
{&lt;br /&gt;
       &lt;br /&gt;
       &lt;br /&gt;
       HPOWERNOTIFY RegistrationHandle;&lt;br /&gt;
&lt;br /&gt;
       printf("Hello world\n");&lt;br /&gt;
       &lt;br /&gt;
       PowerRegisterSuspendResumeNotification(&lt;br /&gt;
              DEVICE_NOTIFY_CALLBACK,&lt;br /&gt;
              &amp;amp;testCallback,&lt;br /&gt;
              &amp;amp;RegistrationHandle&lt;br /&gt;
              );     &lt;br /&gt;
/*&lt;br /&gt;
       while(true) {&lt;br /&gt;
              Sleep(1000);&lt;br /&gt;
       }&lt;br /&gt;
*/&lt;br /&gt;
       return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1&amp;gt;------ Rebuild All started: Project: test1, Configuration: Debug Win32 ------&lt;br /&gt;
1&amp;gt;Deleting intermediate and output files for project 'test1', configuration 'Debug|Win32'&lt;br /&gt;
1&amp;gt;Compiling...&lt;br /&gt;
1&amp;gt;standby.cpp&lt;br /&gt;
standby.cpp(33) : error C2146: syntax error : missing ';' before identifier 'testCallback'&lt;br /&gt;
standby.cpp(33) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int&lt;br /&gt;
standby.cpp(33) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int&lt;br /&gt;
standby.cpp(34) : error C2440: 'initializing' : cannot convert from 'ULONG (__cdecl *)(PVOID,ULONG,PVOID)' to 'int'&lt;br /&gt;
1&amp;gt;        There is no context in which this conversion is possible&lt;br /&gt;
standby.cpp(36) : error C2065: 'nullptr' : undeclared identifier&lt;br /&gt;
standby.cpp(36) : error C2078: too many initializers&lt;br /&gt;
standby.cpp(48) : error C2065: 'DEVICE_NOTIFY_CALLBACK' : undeclared identifier&lt;br /&gt;
standby.cpp(47) : error C3861: 'PowerRegisterSuspendResumeNotification': identifier not found&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vcpage/430215/430215/urgent-help-vs2008-build-errors/</guid>
      <pubDate>Sun, 11 Nov 2012 20:07:14 -0700</pubDate>
      <category>Visual C++</category>
    </item>
  </channel>
</rss>