Compiling with Platform SDK - doen'ts understand BOOL and WINAPI etc.

I downloaded VC++ 2005 Beta 2 & the Platform SDK. I'm having trouble compiling. I generated a console application. My program has this include:
#include "stdafx.h"

Inside sdtafx.h I have this code:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include <tchar.h>
// TODO: reference additional headers your program requires here
#include <psapi.h>

When I try to build my project I get lots of errors like this:
f:\program files\microsoft platform sdk\include\psapi.h(34) : error C2146: syntax error : missing ';' before identifier 'WINAPI'
f:\program files\microsoft platform sdk\include\psapi.h(34) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\program files\microsoft platform sdk\include\psapi.h(34) : error C2146: syntax error : missing ';' before identifier 'EnumProcesses'
f:\program files\microsoft platform sdk\include\psapi.h(34) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\program files\microsoft platform sdk\include\psapi.h(35) : error C2065: 'DWORD' : undeclared identifier
f:\program files\microsoft platform sdk\include\psapi.h(35) : error C2065: 'lpidProcess' : undeclared identifier

It is not recognizing the macros like BOOL and WINAPI. What am I missing to define them?
TIA,
Joe

[1785 byte] By [JoeLynn] at [2007-12-16]
# 1
Hi!

You should include <windows.h> before including <psapi.h>:

#include <windows.h>
#include <psapi.h>

Greetings
Jochen

JochenKalmbach at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ General...
# 2
Thanks very much for your help
All the best,
Joe
JoeLynn at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ General...