GetWindowLongPtr and SetWindowLongPtr both appear in the windows unit of Delphi 2009 (version 12 of the compiler).
{$EXTERNALSYM GetWindowLongPtr}
function GetWindowLongPtr(hWnd: HWND; nIndex: Integer): LONG_PTR; stdcall;
{$EXTERNALSYM SetWindowLongPtr}
function SetWindowLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR; stdcall;
The Ansi and Wide versions of the API are also declared, although there is no difference except in name and calls aren't diverted like with many other API functions where the "unadorned" version of a MyApiFunction is redirected to either the MyApiFunctionA (pre D2009) or the MyApiFunctionW (D2009+) function. As in:
function MyApiFunction; external advapi32 name 'MyApiFunctionW';
function MyApiFunctionA; external advapi32 name 'MyApiFunctionA';
function MyApiFunctionW; external advapi32 name 'MyApiFunctionW';
If D2006 doesn't define them as @Frank Shearer says, and the issue was open in QC for D2007 and closed for version 12 (D200(), I guess D2009 is indeed the version in which these declaration were added.
Please note that you can always add the declaration of a Windows API yourself if it isn't provided by the Delphi version you are using. And as always with API functions it is wise to know from which Windows version on they exist so you don't call API's that do not exist on the platform on which your program is running.