[fpc-devel] patch:more clear definition of makeintresource, clearer definitions in wince defines.inc

Roozbeh GHolizadeh roozbehid at yahoo.com
Thu Feb 15 13:33:45 CET 2007


Summary :
"MakeIntResource" was previously declared as function in win32 and wince,windows.pp files,also we had one declared in rtl\resh.inc as pchar and also there was some uses of it just as pchar in classes.
All these makes some problems in lazarus,as we cant have constants declared as arrays of makeintresource and things like this.
Obviously makeintresource is just a type definition,so instead of this function
 
function MAKEINTRESOURCE(i : longint) : LPTSTR;
    begin
       MAKEINTRESOURCE:=LPTSTR(DWORD(WORD(i)));
    end;
 
it could be changed into pchar(LPSTR) or pwidechar(lpwcstr).
and making all other functions being declared as constants.
 
I suggest the same changes also to win32.
 
regards,
roozbeh
 


Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.
Index: inc/resh.inc
===================================================================
--- inc/resh.inc    (revision 6486)
+++ inc/resh.inc    (working copy)
@@ -3,7 +3,12 @@
   TResourceHandle = Cardinal;
   HMODULE = Cardinal;
   HGLOBAL = Cardinal;
+{$ifdef UNICODE}
+  {roozbeh : maybe it shoud be moved after ifndef mswindows,as there is one declared in wince,base.inc}
+  MAKEINTRESOURCE = pwidechar;
+{$else}
   MAKEINTRESOURCE = pchar;
+{$endif}  
   
{$ifndef MSWINDOWS }
{ windows has this in the windows unit. It probably would better
Index: objpas/types.pp
===================================================================
--- objpas/types.pp    (revision 6486)
+++ objpas/types.pp    (working copy)
@@ -21,8 +21,14 @@
        Windows;
{$endif Windows}

-const
+  {$ifdef wince}
+  //roozbeh:the reason is currently RT_RCDATA is defines in windows for wince as constant,
+  //        but in win32 it is function so here is required to redeclared.
+  //RT_RCDATA = PWideChar(10);
+  {$else}
+ const
   RT_RCDATA = PChar(10);
+  {$endif}

type
   DWORD = LongWord;
Index: wince/wininc/base.inc
===================================================================
--- wince/wininc/base.inc    (revision 6486)
+++ wince/wininc/base.inc    (working copy)
@@ -54,7 +54,9 @@
   const
      ANYSIZE_ARRAY = 1;               //~winnt, moved from define to compile SID
   type
-     ATOM = word;                     //windef
+
+     MAKEINTRESOURCE = pwidechar;
+     ATOM = word;                     //windef
      TAtom = ATOM;

      WINBOOL = longbool;
@@ -461,9 +463,6 @@
   { argument types are unknown }
   function MAKEINTATOM(i : longint) : LPTSTR;

-  { was #define dname(params) def_expr }
-  { argument types are unknown }
-  function MAKEINTRESOURCE(i : longint) : LPTSTR;

   { was #define dname(params) def_expr }
   { argument types are unknown }
@@ -859,12 +858,6 @@
        MAKEINTATOM:=LPTSTR(DWORD(WORD(i)));
     end;

-  { was #define dname(params) def_expr }
-  { argument types are unknown }
-  function MAKEINTRESOURCE(i : longint) : LPTSTR;
-    begin
-       MAKEINTRESOURCE:=LPTSTR(DWORD(WORD(i)));
-    end;

   { was #define dname(params) def_expr }
   { argument types are unknown }
Index: wince/wininc/defines.inc
===================================================================
--- wince/wininc/defines.inc    (revision 6486)
+++ wince/wininc/defines.inc    (working copy)
@@ -50,10 +50,9 @@

{$PACKRECORDS C}

-  { was #define dname def_expr }
-  function UNICODE_NULL : WCHAR;

   const
+     UNICODE_NULL  = widechar(#0);
      NULL=0;                            //+windef
      //FALSE=0;                         //+windef, removed can't compile
      //TRUE=1;                          //+windef, removed can't compile
@@ -1155,62 +1154,21 @@
   { EnumPrinters  }
   { EnumProtocols  }
   { EnumResLangProc  }
-    { was #define dname def_expr }
-    function RT_ACCELERATOR : LPTSTR;
-      { return type might be wrong }
+     RT_ACCELERATOR = MAKEINTRESOURCE(9);
+     RT_BITMAP = MAKEINTRESOURCE(2);
+     RT_DIALOG = MAKEINTRESOURCE(5);
+     RT_FONT = MAKEINTRESOURCE(8);
+     RT_FONTDIR = MAKEINTRESOURCE(7);
+     RT_MENU = MAKEINTRESOURCE(4);
+     RT_RCDATA = MAKEINTRESOURCE(10);
+     RT_STRING = MAKEINTRESOURCE(6);
+     RT_MESSAGETABLE = MAKEINTRESOURCE(11);
+     RT_CURSOR = MAKEINTRESOURCE(1);
+     RT_GROUP_CURSOR = MAKEINTRESOURCE(12);
+     RT_ICON = MAKEINTRESOURCE(3);
+     RT_GROUP_ICON = MAKEINTRESOURCE(13);
+     RT_VERSION = MAKEINTRESOURCE(16);

-    { was #define dname def_expr }
-    function RT_BITMAP : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function RT_DIALOG : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function RT_FONT : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function RT_FONTDIR : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function RT_MENU : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function RT_RCDATA : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function RT_STRING : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function RT_MESSAGETABLE : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function RT_CURSOR : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function RT_GROUP_CURSOR : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function RT_ICON : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function RT_GROUP_ICON : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function RT_VERSION : LPTSTR;
-      { return type might be wrong }
-
   { EnumServicesStatus  }

   const
@@ -1621,94 +1579,29 @@
      HANDLE_FLAG_INHERIT = 1;
      HANDLE_FLAG_PROTECT_FROM_CLOSE = 2;
   { GetIconInfo  }
-    { was #define dname def_expr }
-    function IDC_ARROW : LPTSTR;
-      { return type might be wrong }
+     IDC_ARROW = MAKEINTRESOURCE(32512);
+     IDC_IBEAM = MAKEINTRESOURCE(32513);
+     IDC_WAIT = MAKEINTRESOURCE(32514);
+     IDC_CROSS = MAKEINTRESOURCE(32515);
+     IDC_UPARROW = MAKEINTRESOURCE(32516);
+     IDC_SIZENWSE = MAKEINTRESOURCE(32642);
+     IDC_SIZENESW = MAKEINTRESOURCE(32643);
+     IDC_SIZEWE = MAKEINTRESOURCE(32644);
+     IDC_SIZENS = MAKEINTRESOURCE(32645);
+     IDC_SIZEALL = MAKEINTRESOURCE(32646);
+     IDC_NO = MAKEINTRESOURCE(32648);
+     IDC_APPSTARTING = MAKEINTRESOURCE(32650);
+     IDC_HELP = MAKEINTRESOURCE(32651);
+     IDI_APPLICATION = MAKEINTRESOURCE(32512);
+     IDI_HAND = MAKEINTRESOURCE(32513);
+     IDI_QUESTION = MAKEINTRESOURCE(32514);
+     IDI_EXCLAMATION = MAKEINTRESOURCE(32515);
+     IDI_ASTERISK = MAKEINTRESOURCE(32516);
+     IDI_WINLOGO = MAKEINTRESOURCE(32517);
+     IDC_SIZE = MAKEINTRESOURCE(32640);
+     IDC_ICON = MAKEINTRESOURCE(32641);
+     IDC_HAND = MAKEINTRESOURCE(32649);

-    { was #define dname def_expr }
-    function IDC_IBEAM : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDC_WAIT : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDC_CROSS : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDC_UPARROW : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDC_SIZENWSE : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDC_SIZENESW : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDC_SIZEWE : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDC_SIZENS : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDC_SIZEALL : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDC_NO : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDC_APPSTARTING : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDC_HELP : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDI_APPLICATION : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDI_HAND : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDI_QUESTION : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDI_EXCLAMATION : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDI_ASTERISK : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDI_WINLOGO : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDC_SIZE : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDC_ICON : LPTSTR;
-      { return type might be wrong }
-
-    { was #define dname def_expr }
-    function IDC_HAND : LPTSTR;
-      { return type might be wrong }
-
   { GetMapMode  }

   const
@@ -1771,22 +1664,18 @@
      SIF_DISABLENOSCROLL = 8;
      SIF_TRACKPOS = $10;
   { GetStdHandle  }
-    { was #define dname def_expr }
-    function STD_INPUT_HANDLE : DWORD;

-    { was #define dname def_expr }
-    function STD_OUTPUT_HANDLE : DWORD;

-    { was #define dname def_expr }
-    function STD_ERROR_HANDLE : DWORD;
+  { was #define dname def_expr }
+     STD_INPUT_HANDLE = DWORD(-(10));
+     STD_OUTPUT_HANDLE = DWORD(-(11));
+     STD_ERROR_HANDLE = DWORD(-(12));

     { was #define dname def_expr }
-Const
-  INVALID_HANDLE_VALUE = HANDLE(-1);
+     INVALID_HANDLE_VALUE = HANDLE(-1);

   { GetStockObject  }

-  const
      BLACK_BRUSH = 4;
      DKGRAY_BRUSH = 3;
      GRAY_BRUSH = 2;
@@ -2376,7 +2265,7 @@
      SC_MANAGER_MODIFY_BOOT_CONFIG = 32;
   { PostMessage  }
     { was #define dname def_expr }
-    function HWND_BROADCAST : HWND;
+    HWND_BROADCAST              = HWND($FFFF);

   { PrepareTape  }

@@ -2427,27 +2316,14 @@
      RDW_ALLCHILDREN = 128;
      RDW_NOCHILDREN = 64;
   { RegCreateKey  }
-    { was #define dname def_expr }
-    function HKEY_CLASSES_ROOT : HKEY;
+     HKEY_CLASSES_ROOT           = HKEY($80000000);
+     HKEY_CURRENT_USER           = HKEY($80000001);
+     HKEY_LOCAL_MACHINE          = HKEY($80000002);
+     HKEY_USERS                  = HKEY($80000003);
+     HKEY_PERFORMANCE_DATA       = HKEY($80000004);
+     HKEY_CURRENT_CONFIG         = HKEY($80000005);
+     HKEY_DYN_DATA               = HKEY($80000006);

-    { was #define dname def_expr }
-    function HKEY_CURRENT_USER : HKEY;
-
-    { was #define dname def_expr }
-    function HKEY_LOCAL_MACHINE : HKEY;
-
-    { was #define dname def_expr }
-    function HKEY_USERS : HKEY;
-
-    { was #define dname def_expr }
-    function HKEY_PERFORMANCE_DATA : HKEY;
-
-    { was #define dname def_expr }
-    function HKEY_CURRENT_CONFIG : HKEY;
-
-    { was #define dname def_expr }
-    function HKEY_DYN_DATA : HKEY;
-
   { RegCreateKeyEx  }

   const
@@ -2693,19 +2569,12 @@
      EXCEPTION_CONTINUE_EXECUTION = -(1);
      EXCEPTION_CONTINUE_SEARCH = 0;
   { SetWindowPos, DeferWindowPos  }
-    { was #define dname def_expr }
-    function HWND_BOTTOM : HWND;
+     HWND_BOTTOM = HWND(1);
+     HWND_NOTOPMOST = HWND(-(2));
+     HWND_TOP = HWND(0);
+     HWND_TOPMOST = HWND(-(1));

-    { was #define dname def_expr }
-    function HWND_NOTOPMOST : HWND;

-    { was #define dname def_expr }
-    function HWND_TOP : HWND;
-
-    { was #define dname def_expr }
-    function HWND_TOPMOST : HWND;
-
-
   const
      SWP_DRAWFRAME = 32;
      SWP_FRAMECHANGED = 32;
@@ -3242,9 +3111,7 @@
      WIZ_CYDLG = 140;

   { VX_FIXEDFILEINFO structure  }
-    { was #define dname def_expr }
-    function VS_FILE_INFO : LPTSTR;
-      { return type might be wrong }
+     VS_FILE_INFO = MAKEINTRESOURCE(16);


   const
@@ -3773,8 +3640,7 @@
      HHT_TOLEFT = 2048;
      HHT_TORIGHT = 1024;
   { TBADDBITMAP structure  }
-    { was #define dname def_expr }
-    function HINST_COMMCTRL : HINST;
+     HINST_COMMCTRL = HINST(-(1));


   const
@@ -3943,27 +3809,25 @@
      PBS_SMOOTH              = 01;
      PBS_VERTICAL            = 04;

-    { was #define dname def_expr }
-    function LPSTR_TEXTCALLBACKW : LPWSTR;
+     LPSTR_TEXTCALLBACKW = LPWSTR(-(1));
+     LPSTR_TEXTCALLBACKA = LPSTR(-(1));

-    { was #define dname def_expr }
-    function LPSTR_TEXTCALLBACKA : LPSTR;

-{$ifdef UNICODE}
+    {$ifdef UNICODE}

-  {const this is a function in fact !!
-     LPSTR_TEXTCALLBACK = LPSTR_TEXTCALLBACKW;}
-    function LPSTR_TEXTCALLBACK : LPWSTR;
+     {const this is a function in fact !!
+              LPSTR_TEXTCALLBACK = LPSTR_TEXTCALLBACKW;}
+     LPSTR_TEXTCALLBACK          = LPWSTR(-(1));

-{$else}
+    {$else}

-  {const
-     LPSTR_TEXTCALLBACK = LPSTR_TEXTCALLBACKA; }
-    function LPSTR_TEXTCALLBACK : LPSTR;
-{$endif}
-  { UNICODE  }
-  { LV_ITEM structure  }
+     {const
+     LPSTR_TEXTCALLBACK = LPSTR_TEXTCALLBACKA; }
+     LPSTR_TEXTCALLBACK          =LPSTR(-(1));
+    {$endif}

+     { LV_ITEM structure  }
+
   const
      LVIF_TEXT = 1;
      LVIF_IMAGE = 2;
@@ -5169,7 +5033,7 @@
      PRF_OWNED = $20;
   { MapWindowPoints  }
     { was #define dname def_expr }
-    function HWND_DESKTOP : HWND;
+    HWND_DESKTOP = HWND(0);

   { WM_SYSCOMMAND message  }

@@ -5915,264 +5779,10 @@

{$ifdef read_implementation}

-    { was #define dname def_expr }
-    function UNICODE_NULL : WCHAR;
-      begin
-         UNICODE_NULL:=#0;
-      end;

-    { was #define dname def_expr }
-    function RT_ACCELERATOR : LPTSTR;
-      { return type might be wrong }
-      begin
-         RT_ACCELERATOR:=MAKEINTRESOURCE(9);
-      end;

-    { was #define dname def_expr }
-    function RT_BITMAP : LPTSTR;
-      { return type might be wrong }
-      begin
-         RT_BITMAP:=MAKEINTRESOURCE(2);
-      end;

-    { was #define dname def_expr }
-    function RT_DIALOG : LPTSTR;
-      { return type might be wrong }
-      begin
-         RT_DIALOG:=MAKEINTRESOURCE(5);
-      end;

-    { was #define dname def_expr }
-    function RT_FONT : LPTSTR;
-      { return type might be wrong }
-      begin
-         RT_FONT:=MAKEINTRESOURCE(8);
-      end;
-
-    { was #define dname def_expr }
-    function RT_FONTDIR : LPTSTR;
-      { return type might be wrong }
-      begin
-         RT_FONTDIR:=MAKEINTRESOURCE(7);
-      end;
-
-    { was #define dname def_expr }
-    function RT_MENU : LPTSTR;
-      { return type might be wrong }
-      begin
-         RT_MENU:=MAKEINTRESOURCE(4);
-      end;
-
-    { was #define dname def_expr }
-    function RT_RCDATA : LPTSTR;
-      { return type might be wrong }
-      begin
-         RT_RCDATA:=MAKEINTRESOURCE(10);
-      end;
-
-    { was #define dname def_expr }
-    function RT_STRING : LPTSTR;
-      { return type might be wrong }
-      begin
-         RT_STRING:=MAKEINTRESOURCE(6);
-      end;
-
-    { was #define dname def_expr }
-    function RT_MESSAGETABLE : LPTSTR;
-      { return type might be wrong }
-      begin
-         RT_MESSAGETABLE:=MAKEINTRESOURCE(11);
-      end;
-
-    { was #define dname def_expr }
-    function RT_CURSOR : LPTSTR;
-      { return type might be wrong }
-      begin
-         RT_CURSOR:=MAKEINTRESOURCE(1);
-      end;
-
-    { was #define dname def_expr }
-    function RT_GROUP_CURSOR : LPTSTR;
-      { return type might be wrong }
-      begin
-         RT_GROUP_CURSOR:=MAKEINTRESOURCE(12);
-      end;
-
-    { was #define dname def_expr }
-    function RT_ICON : LPTSTR;
-      { return type might be wrong }
-      begin
-         RT_ICON:=MAKEINTRESOURCE(3);
-      end;
-
-    { was #define dname def_expr }
-    function RT_GROUP_ICON : LPTSTR;
-      { return type might be wrong }
-      begin
-         RT_GROUP_ICON:=MAKEINTRESOURCE(13);
-      end;
-
-    { was #define dname def_expr }
-    function RT_VERSION : LPTSTR;
-      { return type might be wrong }
-      begin
-         RT_VERSION:=MAKEINTRESOURCE(16);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_ARROW : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_ARROW:=MAKEINTRESOURCE(32512);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_IBEAM : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_IBEAM:=MAKEINTRESOURCE(32513);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_WAIT : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_WAIT:=MAKEINTRESOURCE(32514);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_CROSS : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_CROSS:=MAKEINTRESOURCE(32515);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_UPARROW : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_UPARROW:=MAKEINTRESOURCE(32516);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_SIZENWSE : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_SIZENWSE:=MAKEINTRESOURCE(32642);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_SIZENESW : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_SIZENESW:=MAKEINTRESOURCE(32643);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_SIZEWE : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_SIZEWE:=MAKEINTRESOURCE(32644);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_SIZENS : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_SIZENS:=MAKEINTRESOURCE(32645);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_SIZEALL : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_SIZEALL:=MAKEINTRESOURCE(32646);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_NO : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_NO:=MAKEINTRESOURCE(32648);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_APPSTARTING : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_APPSTARTING:=MAKEINTRESOURCE(32650);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_HELP : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_HELP:=MAKEINTRESOURCE(32651);
-      end;
-
-    { was #define dname def_expr }
-    function IDI_APPLICATION : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDI_APPLICATION:=MAKEINTRESOURCE(32512);
-      end;
-
-    { was #define dname def_expr }
-    function IDI_HAND : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDI_HAND:=MAKEINTRESOURCE(32513);
-      end;
-
-    { was #define dname def_expr }
-    function IDI_QUESTION : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDI_QUESTION:=MAKEINTRESOURCE(32514);
-      end;
-
-    { was #define dname def_expr }
-    function IDI_EXCLAMATION : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDI_EXCLAMATION:=MAKEINTRESOURCE(32515);
-      end;
-
-    { was #define dname def_expr }
-    function IDI_ASTERISK : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDI_ASTERISK:=MAKEINTRESOURCE(32516);
-      end;
-
-    { was #define dname def_expr }
-    function IDI_WINLOGO : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDI_WINLOGO:=MAKEINTRESOURCE(32517);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_SIZE : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_SIZE:=MAKEINTRESOURCE(32640);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_ICON : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_ICON:=MAKEINTRESOURCE(32641);
-      end;
-
-    { was #define dname def_expr }
-    function IDC_HAND : LPTSTR;
-      { return type might be wrong }
-      begin
-         IDC_HAND:=MAKEINTRESOURCE(32649);
-      end;
-
     { was #define dname(params) def_expr }
     { argument types are unknown }
     { return type might be wrong }
@@ -6198,148 +5808,8 @@
     end;


+//  INVALID_HANDLE_VALUE        = HANDLE(-(1));
     { was #define dname def_expr }
-    function STD_INPUT_HANDLE : DWORD;
-      begin
-         STD_INPUT_HANDLE:=DWORD(-(10));
-      end;
-
-    { was #define dname def_expr }
-    function STD_OUTPUT_HANDLE : DWORD;
-      begin
-         STD_OUTPUT_HANDLE:=DWORD(-(11));
-      end;
-
-    { was #define dname def_expr }
-    function STD_ERROR_HANDLE : DWORD;
-      begin
-         STD_ERROR_HANDLE:=DWORD(-(12));
-      end;
-
-    { was #define dname def_expr }
-{
-    function INVALID_HANDLE_VALUE : HANDLE;
-      begin
-         INVALID_HANDLE_VALUE:=HANDLE(-(1));
-      end;
-}
-
-    { was #define dname def_expr }
-    function HWND_BROADCAST : HWND;
-      begin
-         HWND_BROADCAST:=HWND($FFFF);
-      end;
-
-    { was #define dname def_expr }
-    function HKEY_CLASSES_ROOT : HKEY;
-      begin
-         HKEY_CLASSES_ROOT:=HKEY($80000000);
-      end;
-
-    { was #define dname def_expr }
-    function HKEY_CURRENT_USER : HKEY;
-      begin
-         HKEY_CURRENT_USER:=HKEY($80000001);
-      end;
-
-    { was #define dname def_expr }
-    function HKEY_LOCAL_MACHINE : HKEY;
-      begin
-         HKEY_LOCAL_MACHINE:=HKEY($80000002);
-      end;
-
-    { was #define dname def_expr }
-    function HKEY_USERS : HKEY;
-      begin
-         HKEY_USERS:=HKEY($80000003);
-      end;
-
-    { was #define dname def_expr }
-    function HKEY_PERFORMANCE_DATA : HKEY;
-      begin
-         HKEY_PERFORMANCE_DATA:=HKEY($80000004);
-      end;
-
-    { was #define dname def_expr }
-    function HKEY_CURRENT_CONFIG : HKEY;
-      begin
-         HKEY_CURRENT_CONFIG:=HKEY($80000005);
-      end;
-
-    { was #define dname def_expr }
-    function HKEY_DYN_DATA : HKEY;
-      begin
-         HKEY_DYN_DATA:=HKEY($80000006);
-      end;
-
-    { was #define dname def_expr }
-    function HWND_BOTTOM : HWND;
-      begin
-         HWND_BOTTOM:=HWND(1);
-      end;
-
-    { was #define dname def_expr }
-    function HWND_NOTOPMOST : HWND;
-      begin
-         HWND_NOTOPMOST:=HWND(-(2));
-      end;
-
-    { was #define dname def_expr }
-    function HWND_TOP : HWND;
-      begin
-         HWND_TOP:=HWND(0);
-      end;
-
-    { was #define dname def_expr }
-    function HWND_TOPMOST : HWND;
-      begin
-         HWND_TOPMOST:=HWND(-(1));
-      end;
-
-    { was #define dname def_expr }
-    function VS_FILE_INFO : LPTSTR;
-      { return type might be wrong }
-      begin
-         VS_FILE_INFO:=MAKEINTRESOURCE(16);
-      end;
-
-    { was #define dname def_expr }
-    function HINST_COMMCTRL : HINST;
-      begin
-         HINST_COMMCTRL:=HINST(-(1));
-      end;
-
-    { was #define dname def_expr }
-    function LPSTR_TEXTCALLBACKW : LPWSTR;
-      begin
-         LPSTR_TEXTCALLBACKW:=LPWSTR(-(1));
-      end;
-
-    { was #define dname def_expr }
-    function LPSTR_TEXTCALLBACKA : LPSTR;
-      begin
-         LPSTR_TEXTCALLBACKA:=LPSTR(-(1));
-      end;
-{$ifdef UNICODE}
-
-  {const this is a function in fact !!
-     LPSTR_TEXTCALLBACK = LPSTR_TEXTCALLBACKW;}
-    function LPSTR_TEXTCALLBACK : LPWSTR;
-      begin
-         LPSTR_TEXTCALLBACK:=LPWSTR(-(1));
-      end;
-
-{$else}
-
-  {const
-     LPSTR_TEXTCALLBACK = LPSTR_TEXTCALLBACKA; }
-    function LPSTR_TEXTCALLBACK : LPSTR;
-      begin
-         LPSTR_TEXTCALLBACK:=LPSTR(-(1));
-      end;
-{$endif}
-
-    { was #define dname def_expr }
     function TVI_ROOT : HTREEITEM;
       begin
          TVI_ROOT:=HTREEITEM($FFFF0000);
@@ -6363,12 +5833,6 @@
          TVI_SORT:=HTREEITEM($FFFF0003);
       end;

-    { was #define dname def_expr }
-    function HWND_DESKTOP : HWND;
-      begin
-         HWND_DESKTOP:=HWND(0);
-      end;
-
     { was #define dname(params) def_expr }
     { argument types are unknown }
     { return type might be wrong }


 
____________________________________________________________________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20070215/be3d2a21/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: newpatch1.patch
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20070215/be3d2a21/attachment.ksh>


More information about the fpc-devel mailing list