Now TD 7.0 is here, new x64 specific API's can be used.
Both on x86 and x64 TD versions, these new external function datatypes are available:
Code: Select all
Receive Number: LPLONGLONG
Receive Number: LPULONGLONG
But we have to be aware that TD 7.0 (x64) requires now the correct datatype declarations to work correctly.
Based on the datatype and TD bitness, TD will use 32bit or 64bit sizes.
Some declarations in the WinApi32 archive do have incorrect assigned datatypes . They will work on 32 bit TD versions and have been working for years.
But when porting to TD x64, these API functions will not work anymore and will fail. Result can be crashes or incorrect values passed or received.
Mainly the rule is:
The declaration should exactly match the description on MSDN.
When the API function complies to the exact datatype, the function will work both on x86 and x64.
To keep the WinApi archive usable on x86 and x64, it would be nice to change incorrect declarations to the correct types.
Also to add x64 specific functions.
A new library is added to the archive:
It contains specific x64 API declarations, which can only be used by TD x64 versions.
(it is saved in TD 7.0 text format)
When you find in your projects issues with existing API functions on x64 and have the correct declarations tested, please post the changes here or send it by email.
Also new API declarations are welcome.
To start, here is now a new version, v1.10
It contains already some changes and additions.
https://samples.tdcommunity.net/index ... =WinApi32/
Code: Select all
- NEW: WinApi32_Functions_x64.apl, API's specially for x64 TD versions:
Added USER32.DLL -> GetWindowLongPtrA, GetWindowLongPtrW, SetWindowLongPtrA, SetWindowLongPtrW
-> SetClassLongPtrA, SetClassLongPtrW, GetClassLongPtrA, GetClassLongPtrW
Added SHLWAPI.DLL -> StrFormatByteSize64A, StrFormatByteSizeW
- The following functions have been changed to be compatible with x64:
GetProcAddress, GetModuleHandleA, GetModuleHandleW, LoadLibraryExA, FreeLibrary, RegCloseKey, RegFlushKey
GetThreadLocale, BeginPaint, EnumWindows, EnumThreadWindows, EnumChildWindows, GetWindow, CallWindowProcW
CallWindowProcA, DefWindowProcA, DefWindowProcW, DefDlgProcA, DefDlgProcW, DispatchMessageA, DispatchMessageW
GetClassInfoA, GetClassInfoW, LoadStringW, LoadIconA, LoadCursorA, LoadCursorW, LoadCursorFromFileW
LoadCursorFromFileA, PostThreadMessageW, PostThreadMessageA, SendMessageA, SendMessageW