473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

winternl.h compile error

Hi,

I downloaded the last platform sdk which works with vc++ 6 (February
2003): http://www.microsoft.com/msdownload/.../psdk-full.htm

However im getting a strange error when i compile. what i do is the
following:

- Run this shortcut from the start menu to set variables: Set Windows
XP 32-bit Build Environment (Retail).lnk

- Open vc++ 6 and create a new Win32 Simple Application

- Include winternl.h

This is the code:

#include "stdafx.h"
#include <winternl.h>

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow) {
PROCESS_BASIC_INFORMATION p;
return 0;
}

When compiling i get these errors:

error C2065: 'PROCESS_BASIC_INFORMATION' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 'p'
error C2065: 'p' : undeclared identifier

The include is done correctly but still that (and any) member from the
header isn't recognized.
If i use other headers (just tried a couple) everything works fine.

Any ideas?
Oct 3 '08 #1
2 3674
On Thu, 2 Oct 2008 19:55:29 -0700 (PDT), Gabriel
<ga***********@gmail.comwrote in comp.lang.c++:
Hi,

I downloaded the last platform sdk which works with vc++ 6 (February
2003): http://www.microsoft.com/msdownload/.../psdk-full.htm

However im getting a strange error when i compile. what i do is the
following:

- Run this shortcut from the start menu to set variables: Set Windows
XP 32-bit Build Environment (Retail).lnk

- Open vc++ 6 and create a new Win32 Simple Application

- Include winternl.h

This is the code:

#include "stdafx.h"
#include <winternl.h>

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow) {
PROCESS_BASIC_INFORMATION p;
return 0;
}

When compiling i get these errors:

error C2065: 'PROCESS_BASIC_INFORMATION' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 'p'
error C2065: 'p' : undeclared identifier

The include is done correctly but still that (and any) member from the
header isn't recognized.
If i use other headers (just tried a couple) everything works fine.

Any ideas?
My idea is that you should ask in a Windows programming group.
news:comp.os.ms-windows.programmer.win32 is a very good one.

Nether of these headers is part of the C++ language, they are all
Windows specific extensions. Non-standard extensions are off-topic
here.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
Oct 3 '08 #2
On Oct 3, 1:43*am, Jack Klein <jackkl...@spamcop.netwrote:
On Thu, 2 Oct 2008 19:55:29 -0700 (PDT), Gabriel
<gabriel.ma...@gmail.comwrote in comp.lang.c++:
Hi,
I downloaded the last platform sdk which works with vc++ 6 (February
2003):http://www.microsoft.com/msdownload/.../psdk-full.htm
However im getting a strange error when i compile. what i do is the
following:
- Run this shortcut from the start menu to set variables: Set Windows
XP 32-bit Build Environment (Retail).lnk
- Open vc++ 6 and create a new Win32 Simple Application
- Include winternl.h
This is the code:
#include "stdafx.h"
#include <winternl.h>
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow) {
* *PROCESS_BASIC_INFORMATION p;
* *return 0;
}
When compiling i get these errors:
error C2065: 'PROCESS_BASIC_INFORMATION' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 'p'
error C2065: 'p' : undeclared identifier
The include is done correctly but still that (and any) member from the
header isn't recognized.
If i use other headers (just tried a couple) everything works fine.
Any ideas?

My idea is that you should ask in a Windows programming group.
news:comp.os.ms-windows.programmer.win32 is a very good one.

Nether of these headers is part of the C++ language, they are all
Windows specific extensions. *Non-standard extensions are off-topic
here.

--
Jack Klein
Home:http://JK-Technology.Com
FAQs for
comp.lang.chttp://c-faq.com/
comp.lang.c++http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
OK, thank you for the advice, I'll do that and sorry for asking in the
wrong group.
Oct 3 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Danny Boelens | last post by:
Hi all, today I ran into a compile error after a compiler upgrade. I made a small example to demonstrate my compile error: template<typename T1, typename T2> class A {}; class B
5
by: Carmine Cairo | last post by:
Hi, I'm working on a project and today I've note a little problem during the compile fase. Here a little piece of code: // 1st version welldone = 0; size = p->getSize(); backbone = new...
5
by: Brice Prunier | last post by:
Here under 4 schemas i'm working with ( it may be long: sorry...) The context is the following : Resident.xsd imports Person.xsd and includes Common.xsd ( anonimous schema: no TargetNamespace )...
10
by: Chris LaJoie | last post by:
Our company has been developing a program in C# for some time now, and we haven't had any problems with it, but just last night something cropped up that has me, and everyone else, stumped. I...
6
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked...
9
by: ThunderMusic | last post by:
Hi, I'd like to create a compile time error in my class... maybe there's a way already built in in the framework so I can achieve what I want... I have 2 constructors in my class. One of them...
4
by: tony | last post by:
Hello! My question is about calling this method CollectData below but I get a compile error that I shouldn't have because the type parameter is correct. The compile error is the following:...
5
by: wong_powah | last post by:
#include <vector> #include <iostream> using std::cout; using std::vector; enum {DATASIZE = 20}; typedef unsigned char data_t;
2
by: BruceWho | last post by:
I downloaded boost1.35.0 and built it with following command: bjam --toolset=msvc-7.1 --variant=release --threading=multi -- link=shared --with-system stage and it failed to compile, error...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.