From: Larry Lindstrom on
Hello Folks:

Developing on Win2K, VC6.

While I haven't given up on getting VS 2008 working on
the XP machine, I do need to get the project moving while
I try to figure out what's made a piece of code VS 2008
never touched suddenly stop working.

So I've replaced a broken hard drive in my Win2K PC and
reloaded the OS and VC6. I've also updated Win2K, VC6 and
the Platoform SDK.

Now I'm copying the source for each of my libraries to
the WIN2K PC and attempting to build them.

I'm getting errors.

'GetWindowLongPtr' :undeclared identifier

MSDN says this is declared in Winuser.h, which is
included with Windows.h. I've checked, and Winuser.h
is being included, and GetWindowLongPtr is declared
for both #ifdef _WIN64 and its #else clause, Unicode
and not Unicode. I haven't traced every #if in this
11836 line header to see if there is some other
condition that needs to be met to get this to work.

MSDN also says this is compatible with evey OS from
Win95 and Nt 3.1 forward.

What does it take to get GetWindowLongPtr() defined?

Another error is coming from gdiplusinit.h,

error C2065: 'ULONG_PTR' undeclared identifier

Any idea where this is defined?

I was developing code that used GDI+ on the Win2K
machine before I moved development to the XP machine,
and I don't remember seeing this error.

Why does this have to be so difficult?

Thanks
Larry
From: Sebastian G. on
Larry Lindstrom wrote:


> MSDN says this is declared in Winuser.h, which is
> included with Windows.h. I've checked, and Winuser.h
> is being included, and GetWindowLongPtr is declared
> for both #ifdef _WIN64 and its #else clause, Unicode
> and not Unicode. I haven't traced every #if in this
> 11836 line header to see if there is some other
> condition that needs to be met to get this to work.


Try insert some #error statements and check if they're actually reached.

> Another error is coming from gdiplusinit.h,
>
> error C2065: 'ULONG_PTR' undeclared identifier
>
> Any idea where this is defined?


Somewhere in the reach of windows.h.

> I was developing code that used GDI+ on the Win2K
> machine before I moved development to the XP machine,
> and I don't remember seeing this error.


Then maybe you should set WINVER and WIN32_WINNT appropriately? Might also
solve the GetWindowLongPtr problem.

> Why does this have to be so difficult?


Because it's s big step from VC6 to VC2008 (VC9)? Fixing a massive amount of
outstanding bugs, switching to the C99 and C++ 2003 standard (already
starting C++0x), a big rework of the headers from the Platform SDK, ...

If had started porting your code with early VC7 many of remaining issues
could be pretty easily resolved, even when directly going from VC7 to VC9.