GetClassLongPtr
GetWindowLongPtr
SetClassLongPtr
SetWindowLongPtr
missing from user32.inc
i know - they are probably "aliases" for Get/Set Class/Window Long functions on 32-bit OS's
but - it would be nice to have them :P
ok - my mistake
they do not show up in my version of user32.dll (xp sp3)
i was going by the MSDN documentation...
QuoteNote: To write code that is compatible with both 32-bit and 64-bit versions of Windows,
use GetClassLongPtr. When compiling for 32-bit Windows, GetClassLongPtr is defined
as a call to the GetClassLong function.
i suppose you could make that happen with some TEXTEQU's
Quote
IFDEF _WIN64
;API
GetClassLongPtrA PROTO :DWORD ,:DWORD
;API
GetClassLongPtrW PROTO :DWORD ,:DWORD
IFDEF UNICODE
GetClassLongPtr equ < GetClassLongPtrW>
ELSE
GetClassLongPtr equ < GetClassLongPtrA>
ENDIF ; !UNICODE
and .....
Quote
IFDEF UNICODE
SetClassLongPtr equ < SetClassLongPtrW>
ELSE
SetClassLongPtr equ < SetClassLongPtrA>
ENDIF ; !UNICODE
ELSE
GetClassLongPtrA equ < GetClassLongA>
GetClassLongPtrW equ < GetClassLongW>
IFDEF UNICODE
GetClassLongPtr equ < GetClassLongPtrW>
ELSE
GetClassLongPtr equ < GetClassLongPtrA>
ENDIF ; !UNICODE
Just replace the call to GetClassLongPtr by GetClassLong
And if the future of your code is to be build under 64 bits ,you are ready.
Use the "ready to use sdk" for this,citations are extract for him.
In the Microsoft WinUser.h, unless _WIN64 is defined the ...LongPtr function names are effectively equated to the older functions:
#define GetClassLongPtrA GetClassLongA
#define GetClassLongPtrW GetClassLongW