|
-
September 8th, 2008, 06:56 AM
#1
[RESOLVED] PCONTEXT undefined
I don't use C++ often, so probably doing everything wrong ... 
I'm trying to use some simple functions found on the forum.
Getting some errors about
* LONG being undefined, so included <Windef.h>
* FILETIME being undefined, so included <WinBase.h>
...
Now PCONTEXT is undefined (in WinBase.h line typedef PCONTEXT LPCONTEXT;) and I don't know where to get it's definition.
And also other syntax errors on WinBase (line IN va_list *Arguments)
I'm using VisualStudio.NET, VC++ version 7.
What am I doing wrong?
Thks
Last edited by DeepButi; September 9th, 2008 at 03:04 AM.
Did it help? rate it.
The best conversation I had was over forty million years ago ... and that was with a coffee machine.
-
September 8th, 2008, 07:03 AM
#2
Re: PCONTEXT undefined
Remove those includes and replace them with windows.h
-
September 8th, 2008, 08:05 AM
#3
Re: PCONTEXT undefined
Did it help? rate it.
The best conversation I had was over forty million years ago ... and that was with a coffee machine.
-
September 8th, 2008, 08:54 AM
#4
Re: PCONTEXT undefined
Was in bit of hurry when writing that previous post...
Including windows.h is surprisingly often sufficient and when it's not enough it's mentioned in MSDN. Check out these examples:
For the function CreateWindow, http://msdn.microsoft.com/en-us/library/ms632679.aspx, MSDN states: declared in Winuser.h, include Windows.h; requires linking to User32.lib. This is kind of the normal situation, even if another header declares the stuff windows.h shall be included.
Some functions requires other headers and MSDN also clearly states this. For instance the function getsockname, http://msdn.microsoft.com/en-us/libr...43(VS.85).aspx, MSDN states: is declared in Winsock2.h; requires linking with Ws2_32.lib
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|