فهرست منبع

* Split combined declarations of GetModuleHandle and GetModuleFileName into separate WinCE and non-WinCE versions. Using Pointer as 'common denominator' in combined declarations was making it impossible to use e.g. GetModuleHandle('literal') in System unit.
* Also fixed parameter and return types for these declarations.

git-svn-id: trunk@19881 -

sergei 13 سال پیش
والد
کامیت
ce2812e24a
1فایلهای تغییر یافته به همراه14 افزوده شده و 5 حذف شده
  1. 14 5
      rtl/win/sysos.inc

+ 14 - 5
rtl/win/sysos.inc

@@ -231,14 +231,23 @@ threadvar
   function ReadProcessMemory(process : THandle;address : pointer;dest : pointer;size : dword;bytesread : pdword) :  longbool;
     stdcall;external 'kernel32' name 'ReadProcessMemory';
 
-{$endif WINCE}
+  { module functions }
+  function GetModuleFileName(l1:THandle;p:PChar;l2:longint):longint;
+    stdcall;external KernelDLL name 'GetModuleFileNameA';
+
+  function GetModuleHandle(p : PChar) : THandle;
+    stdcall;external KernelDLL name 'GetModuleHandleA';
+
+{$else WINCE}
 
    { module functions }
-   function GetModuleFileName(l1:longint;p:pointer;l2:longint):longint;
-     {$ifdef wince}cdecl{$else}stdcall{$endif};external KernelDLL name 'GetModuleFileName' + ApiSuffix;
-   function GetModuleHandle(p : pointer) : PtrUInt;
-     {$ifdef wince}cdecl{$else}stdcall{$endif};external KernelDLL name 'GetModuleHandle' + ApiSuffix;
+   function GetModuleFileName(l1:THandle;p:PWideChar;l2:longint):longint;
+     cdecl;external KernelDLL name 'GetModuleFileNameW';
 
+   function GetModuleHandle(p : PWideChar) : THandle;
+     cdecl;external KernelDLL name 'GetModuleHandleW';
+
+{$endif WINCE}
    { file functions }
    function WriteFile(fh:thandle;buf:pointer;len:longint;var loaded:longint;
      overlap:pointer):longint;