Browse Source

--- Merging r24452 into '.':
U packages/winunits-base/src/shlobj.pp
--- Merging r24658 into '.':
U rtl/win/wininc/base.inc
U rtl/win/wininc/unidef.inc
U rtl/win/wininc/func.inc
--- Merging r24673 into '.':
G rtl/win/wininc/base.inc
U rtl/win/wininc/ascfun.inc

# revisions: 24452,24658,24673
r24452 | marco | 2013-05-05 17:00:36 +0200 (Sun, 05 May 2013) | 1 line
Changed paths:
M /trunk/packages/winunits-base/src/shlobj.pp

* More unicode fixes shlobj.
r24658 | marco | 2013-05-31 11:09:08 +0200 (Fri, 31 May 2013) | 1 line
Changed paths:
M /trunk/rtl/win/wininc/base.inc
M /trunk/rtl/win/wininc/func.inc
M /trunk/rtl/win/wininc/unidef.inc

* some minor fixes to get unit Windows compiled with UNICODE defined.
r24673 | marco | 2013-05-31 19:58:18 +0200 (Fri, 31 May 2013) | 1 line
Changed paths:
M /trunk/rtl/win/wininc/ascfun.inc
M /trunk/rtl/win/wininc/base.inc

* some more Unicode Windows headers fixes.

git-svn-id: branches/fixes_2_6@24984 -

marco 12 years ago
parent
commit
f1335ab563

+ 145 - 10
packages/winunits-base/src/shlobj.pp

@@ -1434,7 +1434,21 @@ Type
      PFILEDESCRIPTORW = ^FILEDESCRIPTORW;
      LPFILEDESCRIPTORW = PFILEDESCRIPTORW;
      PLPFILEDESCRIPTORW = ^LPFILEDESCRIPTORW;
-
+     {$Ifdef Unicode}
+       _FILEDESCRIPTOR   = _FILEDESCRIPTORW;
+       FILEDESCRIPTOR    = _FILEDESCRIPTORW;
+       TFILEDESCRIPTOR   = _FILEDESCRIPTORW;
+       PFILEDESCRIPTOR   = PFILEDESCRIPTORW;
+       LPFILEDESCRIPTOR  = PFILEDESCRIPTORW;
+       PLPFILEDESCRIPTOR = PLPFILEDESCRIPTORW;
+     {$else}
+       _FILEDESCRIPTOR   = _FILEDESCRIPTORA;
+       FILEDESCRIPTOR    = _FILEDESCRIPTORA;
+       TFILEDESCRIPTOR   = _FILEDESCRIPTORA;
+       PFILEDESCRIPTOR   = PFILEDESCRIPTORA;
+       LPFILEDESCRIPTOR  = PFILEDESCRIPTORA;
+       PLPFILEDESCRIPTOR = PLPFILEDESCRIPTORA;
+     {$endif}
      _FILEGROUPDESCRIPTORA = record
           cItems : UINT;
           fgd : array[0..0] of FILEDESCRIPTORA;
@@ -1454,7 +1468,21 @@ Type
      PFILEGROUPDESCRIPTORW = ^FILEGROUPDESCRIPTORW;
      LPFILEGROUPDESCRIPTORW = PFILEGROUPDESCRIPTORW;
      PLPFILEGROUPDESCRIPTORW = ^LPFILEGROUPDESCRIPTORW;
-  
+     {$ifdef Unicode}
+     _FILEGROUPDESCRIPTOR    = _FILEGROUPDESCRIPTORW;
+     FILEGROUPDESCRIPTOR     = _FILEGROUPDESCRIPTORW;
+     TFILEGROUPDESCRIPTOR    = _FILEGROUPDESCRIPTORW;
+     PFILEGROUPDESCRIPTOR    = PFILEGROUPDESCRIPTORW;
+     LPFILEGROUPDESCRIPTOR   = PFILEGROUPDESCRIPTORW;
+     PLPFILEGROUPDESCRIPTOR  = PLPFILEGROUPDESCRIPTORW;
+     {$else}
+     _FILEGROUPDESCRIPTOR    = _FILEGROUPDESCRIPTORA;
+     FILEGROUPDESCRIPTOR     = _FILEGROUPDESCRIPTORA;
+     TFILEGROUPDESCRIPTOR    = _FILEGROUPDESCRIPTORA;
+     PFILEGROUPDESCRIPTOR    = PFILEGROUPDESCRIPTORA;
+     LPFILEGROUPDESCRIPTOR   = PFILEGROUPDESCRIPTORA;
+     PLPFILEGROUPDESCRIPTOR  = PLPFILEGROUPDESCRIPTORA;
+     {$endif}
      _DROPFILES = record
           pFiles : DWORD;        { offset of file list }
           pt : POINT;            { drop point (client coords) }
@@ -1742,7 +1770,6 @@ Type
      LPSHELLSTATEA = PSHELLSTATEA;           {Indicates if the Whistler StartPage on desktop is ON or OFF. }
      PLPSHELLSTATEA = ^LPSHELLSTATEA;
      TSHELLSTATEA = SHELLSTATEA;
-     LPSHELLSTATE = LPSHELLSTATEA;
 
      PSHELLSTATEW = ^SHELLSTATEW;
      SHELLSTATEW = record
@@ -1757,8 +1784,17 @@ Type
        end;                            {Indicates if the Whistler StartPage on desktop is ON or OFF. }
      LPSHELLSTATEW = PSHELLSTATEW;     { If you need a new flag, steal a bit from from fSpareFlags. }
      PLPSHELLSTATEW = ^LPSHELLSTATEW;
-     TSHELLSTATE = SHELLSTATEW;
-
+     {$ifdef Unicode}
+     SHELLSTATE     = SHELLSTATEW;
+     LPSHELLSTATE   = PSHELLSTATEW;
+     PLPSHELLSTATE  = PLPSHELLSTATEW;
+     TSHELLSTATE    = SHELLSTATEW;
+     {$else}
+     LPSHELLSTATE  = PSHELLSTATEA;
+     PLPSHELLSTATE = PLPSHELLSTATEA;
+     TSHELLSTATE   = SHELLSTATEA;
+     SHELLSTAT     = SHELLSTATEA;
+     {$endif}
      PSHELLFLAGSTATE = ^SHELLFLAGSTATE;
      SHELLFLAGSTATE = record
           flag0 : word;
@@ -2413,17 +2449,32 @@ function  SHOpenFolderAndSelectItems(pidlFolder:LPCITEMIDLIST;cidl:UINT;var  api
 function  SHGetSpecialFolderLocation( hwnd:HWND; csidl:longint;out ppidl: LPITEMIDLIST):HResult;StdCall; external 'shell32' name 'SHGetSpecialFolderLocation';
 procedure SHFlushSFCache;StdCall; external 'shell32' name 'SHFlushSFCache';
 function  SHCloneSpecialIDList(HWND:hwnd; csidl:longint;fcreate:BOOL):LPITEMIDLIST; StdCall; external 'shell32' name 'SHCloneSpecialIDList';
+
 function  SHGetSpecialFolderPathA(HWND:hwnd;pszpath: LPSTR; csidl:Longint;fcreate:bool):bool;StdCall; external 'shell32' name 'SHGetSpecialFolderPathA';
-function  SHGetSpecialFolderPath(HWND:hwnd;pszpath: LPSTR; csidl:Longint;fcreate:bool):bool;StdCall; external 'shell32' name 'SHGetSpecialFolderPathA';
 function  SHGetSpecialFolderPathW(HWND:hwnd;pszpath: LPWSTR; csidl:Longint;fcreate:bool):bool;StdCall; external 'shell32' name 'SHGetSpecialFolderPathW';
+{$ifdef unicode}
+function  SHGetSpecialFolderPath(HWND:hwnd;pszpath: LPWSTR; csidl:Longint;fcreate:bool):bool;StdCall; external 'shell32' name 'SHGetSpecialFolderPathW';
+{$else}
+function  SHGetSpecialFolderPath(HWND:hwnd;pszpath: LPSTR; csidl:Longint;fcreate:bool):bool;StdCall; external 'shell32' name 'SHGetSpecialFolderPathA';
+{$endif}
+
 function  SHGetFolderPathA(HWND:hwnd;csidl:longint;htoken:THandle;dwflags:dword;pszpath:lpstr):HResult;StdCall; external 'shell32' name 'SHGetFolderPathA';
-function  SHGetFolderPath(HWND:hwnd;csidl:longint;htoken:THandle;dwflags:dword;pszpath:lpstr):HResult;StdCall; external 'shell32' name 'SHGetFolderPathA';
 function  SHGetFolderPathW(HWND:hwnd;csidl:longint;htoken:THandle;dwflags:dword;pszpath:lpWstr):HResult;StdCall; external 'shell32' name 'SHGetFolderPathW';
+{$ifdef unicode}
+function  SHGetFolderPath(HWND:hwnd;csidl:longint;htoken:THandle;dwflags:dword;pszpath:lpWstr):HResult;StdCall; external 'shell32' name 'SHGetFolderPathW';
+{$else}
+function  SHGetFolderPath(HWND:hwnd;csidl:longint;htoken:THandle;dwflags:dword;pszpath:lpstr):HResult;StdCall; external 'shell32' name 'SHGetFolderPathA';
+{$endif}
+
 function  SHGetFolderPathAndSubDirA(HWND:hwnd;csidl:longint;htoken:THandle;dwflags:dword;pszsubdir:LPCStr;pszpath:lpstr):HResult;StdCall; external 'shell32' name 'SHGetFolderPathAndSubDirA';
-function  SHGetFolderPathAndSubDir(HWND:hwnd;csidl:longint;htoken:THandle;dwflags:dword;pszsubdir:LPCStr;pszpath:lpstr):HResult;StdCall; external 'shell32' name 'SHGetFolderPathAndSubDirA';
 function  SHGetFolderPathAndSubDirW(HWND:hwnd;csidl:longint;htoken:THandle;dwflags:dword;pszsubdir:LPCWStr;pszpath:lpWstr):HResult; external 'shell32' name 'SHGetFolderPathAndSubDirW';
-function  SHFolderLocation(HWND:hwnd;csidl:longint;htoken:THandle;dwflags:dword;var ppidl:LPITEMIDLIST):HRESULT;StdCall; external 'shell32' name 'SHFolderLocation';
+{$ifdef unicode}
+function  SHGetFolderPathAndSubDir (HWND:hwnd;csidl:longint;htoken:THandle;dwflags:dword;pszsubdir:LPCWStr;pszpath:lpWstr):HResult; external 'shell32' name 'SHGetFolderPathAndSubDirW';
+{$else}
+function  SHGetFolderPathAndSubDir (HWND:hwnd;csidl:longint;htoken:THandle;dwflags:dword;pszsubdir:LPCStr;pszpath:lpstr):HResult;StdCall; external 'shell32' name 'SHGetFolderPathAndSubDirA';
+{$endif}
 
+function  SHFolderLocation(HWND:hwnd;csidl:longint;htoken:THandle;dwflags:dword;var ppidl:LPITEMIDLIST):HRESULT;StdCall; external 'shell32' name 'SHFolderLocation';
 
 Const External_Library = 'shell32';
 
@@ -2431,11 +2482,29 @@ Const External_Library = 'shell32';
   procedure SHFree(pv:pointer);StdCall;external External_library name 'SHFree';
   function SHGetIconOverlayIndexA(pszIconPath:lpcstr; iIconIndex:Longint):Longint;StdCall;external External_library name 'SHGetIconOverlayIndexA';
   function SHGetIconOverlayIndexW(pszIconPath:lpcwstr; iIconIndex:Longint):Longint;StdCall;external External_library name 'SHGetIconOverlayIndexW';
+  {$ifdef Unicode}
+  function SHGetIconOverlayIndex (pszIconPath:lpcwstr; iIconIndex:Longint):Longint;StdCall;external External_library name 'SHGetIconOverlayIndexW';
+  {$else}
+  function SHGetIconOverlayIndex (pszIconPath:lpcstr; iIconIndex:Longint):Longint;StdCall;external External_library name 'SHGetIconOverlayIndexA';
+  {$endif}
+
   function SHGetPathFromIDListA(pidl:LPCITEMIDLIST; pszPath:LPStr):BOOL;StdCall;external External_library name 'SHGetPathFromIDListA';
   function SHGetPathFromIDListW(pidl:LPCITEMIDLIST; pszPath:LPWStr):BOOL;StdCall;external External_library name 'SHGetPathFromIDListW';
+  {$ifdef unicode}
+  function SHGetPathFromIDList (pidl:LPCITEMIDLIST; pszPath:LPWStr):BOOL;StdCall;external External_library name 'SHGetPathFromIDListW';
+  {$else}
+  function SHGetPathFromIDList (pidl:LPCITEMIDLIST; pszPath:LPStr):BOOL;StdCall;external External_library name 'SHGetPathFromIDListA';
+  {$endif}
   function SHCreateDirectory(hwnd:HWND; pszPath:lpcwstr):Longint;StdCall;external External_library name 'SHCreateDirectory';
+
   function SHCreateDirectoryExA(hwnd:HWND; pszPath:lpcstr; psa:LPSECURITY_ATTRIBUTES):Longint;StdCall;external External_library name 'SHCreateDirectoryExA';
   function SHCreateDirectoryExW(hwnd:HWND; pszPath:lpcwstr; psa:LPSECURITY_ATTRIBUTES):Longint;StdCall;external External_library name 'SHCreateDirectoryExW';
+  {$ifdef unicode}
+  function SHCreateDirectoryEx (hwnd:HWND; pszPath:lpcwstr; psa:LPSECURITY_ATTRIBUTES):Longint;StdCall;external External_library name 'SHCreateDirectoryExW';
+  {$else}
+  function SHCreateDirectoryEx (hwnd:HWND; pszPath:lpcstr; psa:LPSECURITY_ATTRIBUTES):Longint;StdCall;external External_library name 'SHCreateDirectoryExA';
+  {$endif}
+
 {
   function SHOpenFolderAndSelectItems(pidlFolder:LPCITEMIDLIST; cidl:UINT; var apidl:LPCITEMIDLIST; dwFlags:DWord):HRESULT;StdCall;external External_library name 'SHOpenFolderAndSelectItems';
   function SHCreateShellItem(pidlParent:LPCITEMIDLIST; psfParent:IShellFolder; pidl:LPCITEMIDLIST;out ppsi:IShellItem):HRESULT;StdCall;external External_library name 'SHCreateShellItem';
@@ -2448,16 +2517,36 @@ Const External_Library = 'shell32';
 }
   function SHGetSetFolderCustomSettingsA(pfcs:LPSHFOLDERCUSTOMSETTINGSA; pszPath:lpcstr; dwReadWrite:DWord):HRESULT;StdCall;external External_library name 'SHGetSetFolderCustomSettingsA';
   function SHGetSetFolderCustomSettingsW(pfcs:LPSHFOLDERCUSTOMSETTINGSW; pszPath:lpcwstr; dwReadWrite:DWord):HRESULT;StdCall;external External_library name 'SHGetSetFolderCustomSettingsW';
+  {$ifdef unicode}
+  function SHGetSetFolderCustomSettings (pfcs:LPSHFOLDERCUSTOMSETTINGSW; pszPath:lpcwstr; dwReadWrite:DWord):HRESULT;StdCall;external External_library name 'SHGetSetFolderCustomSettingsW';
+  {$else}
+  function SHGetSetFolderCustomSettings (pfcs:LPSHFOLDERCUSTOMSETTINGSA; pszPath:lpcstr; dwReadWrite:DWord):HRESULT;StdCall;external External_library name 'SHGetSetFolderCustomSettingsA';
+  {$endif}
+
+
   function SHBrowseForFolderA(lpbi:LPBROWSEINFOA):LPITEMIDLIST;StdCall;external External_library name 'SHBrowseForFolderA';
   function SHBrowseForFolderW(lpbi:LPBROWSEINFOW):LPITEMIDLIST;StdCall;external External_library name 'SHBrowseForFolderW';
+  {$ifdef unicode}
+  function SHBrowseForFolder (lpbi:LPBROWSEINFOW):LPITEMIDLIST;StdCall;external External_library name 'SHBrowseForFolderW';
+  {$else}
+  function SHBrowseForFolder (lpbi:LPBROWSEINFOA):LPITEMIDLIST;StdCall;external External_library name 'SHBrowseForFolderA';
+  {$endif}
+
   function SHLoadInProc(const rclsid:Tguid):HRESULT;StdCall;external External_library name 'SHLoadInProc';
   function SHEnableServiceObject(const rclsid:Tguid; fEnable:BOOL):HRESULT;StdCall;external External_library name 'SHEnableServiceObject';
 //  function SHGetDesktopFolder(out ppshf:IShellFolder):HRESULT;StdCall;external External_library name 'SHGetDesktopFolder';
   procedure SHChangeNotify(wEventId:LONG; uFlags:UINT; dwItem1:POINTER; dwItem2:POINTER);StdCall;external External_library name 'SHChangeNotify';
   procedure SHAddToRecentDocs(uFlags:UINT; pv:POINTER);StdCall;external External_library name 'SHAddToRecentDocs';
   function SHHandleUpdateImage(pidlExtra:LPCITEMIDLIST):Longint;StdCall;external External_library name 'SHHandleUpdateImage';
+
   procedure SHUpdateImageA(pszHashItem:lpcstr; iIndex:Longint; uFlags:UINT; iImageIndex:Longint);StdCall;external External_library name 'SHUpdateImageA';
   procedure SHUpdateImageW(pszHashItem:lpcwstr; iIndex:Longint; uFlags:UINT; iImageIndex:Longint);StdCall;external External_library name 'SHUpdateImageW';
+  {$ifdef Unicode}
+  procedure SHUpdateImage (pszHashItem:lpcwstr; iIndex:Longint; uFlags:UINT; iImageIndex:Longint);StdCall;external External_library name 'SHUpdateImageW';
+  {$else}
+  procedure SHUpdateImage (pszHashItem:lpcstr; iIndex:Longint; uFlags:UINT; iImageIndex:Longint);StdCall;external External_library name 'SHUpdateImageA';
+  {$endif}
+
   function SHChangeNotifyRegister(hwnd:HWND; fSources:Longint; fEvents:LONG; wMsg:UINT; cEntries:Longint; 
              pshcne:PSHChangeNotifyEntry):ULONG;StdCall;external External_library name 'SHChangeNotifyRegister';
   function SHChangeNotifyDeregister(ulID:ulong):BOOL;StdCall;external External_library name 'SHChangeNotifyDeregister';
@@ -2467,6 +2556,12 @@ Const External_Library = 'shell32';
   function SHGetInstanceExplorer(out ppunk:IUnknown):HRESULT;StdCall;external External_library name 'SHGetInstanceExplorer';
   function SHGetDataFromIDListA(psf:IShellFolder; pidl:LPCITEMIDLIST; nFormat:Longint; pv:pointer; cb:Longint):HRESULT;StdCall;external External_library name 'SHGetDataFromIDListA';
   function SHGetDataFromIDListW(psf:IShellFolder; pidl:LPCITEMIDLIST; nFormat:Longint; pv:pointer; cb:Longint):HRESULT;StdCall;external External_library name 'SHGetDataFromIDListW';
+  {$ifdef Unicode}
+  function SHGetDataFromIDList (psf:IShellFolder; pidl:LPCITEMIDLIST; nFormat:Longint; pv:pointer; cb:Longint):HRESULT;StdCall;external External_library name 'SHGetDataFromIDListW';
+  {$else}
+  function SHGetDataFromIDList (psf:IShellFolder; pidl:LPCITEMIDLIST; nFormat:Longint; pv:pointer; cb:Longint):HRESULT;StdCall;external External_library name 'SHGetDataFromIDListA';
+  {$endif}
+
   function RestartDialog(hwnd:HWND; lpPrompt:lpcwstr; dwReturn:DWord):Longint;StdCall;external External_library name 'RestartDialog';
   function RestartDialogEx(hwnd:HWND; lpPrompt:lpcwstr; dwReturn:DWord; dwReasonCode:DWord):Longint;StdCall;external External_library name 'RestartDialogEx';
   function SHCoCreateInstance(pszCLSID:lpcwstr; pclsid:PCLSID; pUnkOuter:IUnknown; riid:TREFIID; ppv:Ppointer):HRESULT;StdCall;external External_library name 'SHCoCreateInstance';
@@ -2487,6 +2582,12 @@ Const External_Library = 'shell32';
   function PathIsExe(pszPath:lpcwstr):BOOL;StdCall;external External_library name 'PathIsExe';
   function PathIsSlowA(pszFile:lpcstr; dwAttr:DWord):BOOL;StdCall;external External_library name 'PathIsSlowA';
   function PathIsSlowW(pszFile:lpcwstr; dwAttr:DWord):BOOL;StdCall;external External_library name 'PathIsSlowW';
+  {$ifdef Unicode}
+  function PathIsSlow (pszFile:lpcwstr; dwAttr:DWord):BOOL;StdCall;external External_library name 'PathIsSlowW';
+  {$else}
+  function PathIsSlow (pszFile:lpcstr; dwAttr:DWord):BOOL;StdCall;external External_library name 'PathIsSlowA';
+  {$endif}
+
   function PathCleanupSpec(pszDir:lpcwstr; pszSpec:LPWStr):Longint;StdCall;external External_library name 'PathCleanupSpec';
   function PathResolve(pszPath:LPWStr; dirs:array of lpcwstr; fFlags:UINT):Longint;StdCall;external External_library name 'PathResolve';
   function GetFileNameFromBrowse(hwnd:HWND; pszFilePath:LPWStr; cbFilePath:UINT; pszWorkingDir:lpcwstr; pszDefExt:lpcwstr; 
@@ -2514,7 +2615,11 @@ Const External_Library = 'shell32';
   function ILSaveToStream(pstm:IStream; pidl:LPCITEMIDLIST):HRESULT;StdCall;external External_library name 'ILSaveToStream';
   function ILCreateFromPathA(pszPath:lpcstr):LPITEMIDLIST;StdCall;external External_library name 'ILCreateFromPathA';
   function ILCreateFromPathW(pszPath:lpcwstr):LPITEMIDLIST;StdCall;external External_library name 'ILCreateFromPathW';
-  function ILCreateFromPath(pszPath:LPCTSTR):LPITEMIDLIST;StdCall;external External_library name 'ILCreateFromPath';
+  {$ifdef Unicode}
+  function ILCreateFromPath(pszPath:lpcwstr):LPITEMIDLIST;StdCall;external External_library name 'ILCreateFromPathW';
+  {$else}
+  function ILCreateFromPath(pszPath:lpcstr):LPITEMIDLIST;StdCall;external External_library name 'ILCreateFromPathA';
+  {$endif}
   function SHILCreateFromPath(szPath:lpcwstr;var ppidl:LPITEMIDLIST; rgfInOut:PDWORD):HRESULT;StdCall;external External_library name 'SHILCreateFromPath';
   function OpenRegStream(hkey:HKEY; pszSubkey:lpcwstr; pszValue:lpcwstr; grfMode:DWord):IStream;StdCall;external External_library name 'OpenRegStream';
   function SHFindFiles(pidlFolder:LPCITEMIDLIST; pidlSaveFile:LPCITEMIDLIST):BOOL;StdCall;external External_library name 'SHFindFiles';
@@ -2528,10 +2633,23 @@ Const External_Library = 'shell32';
   function SHLoadOLE(lParam:lparam):HRESULT;StdCall;external External_library name 'SHLoadOLE';
   function SHStartNetConnectionDialogA(hwnd:HWND; pszRemoteName:lpcstr; dwType:DWord):HRESULT;StdCall;external External_library name 'SHStartNetConnectionDialogA';
   function SHStartNetConnectionDialogW(hwnd:HWND; pszRemoteName:lpcwstr; dwType:DWord):HRESULT;StdCall;external External_library name 'SHStartNetConnectionDialogW';
+  {$ifdef Unicode}
+  function SHStartNetConnectionDialog (hwnd:HWND; pszRemoteName:lpcwstr; dwType:DWord):HRESULT;StdCall;external External_library name 'SHStartNetConnectionDialogW';
+  {$else}
+  function SHStartNetConnectionDialog (hwnd:HWND; pszRemoteName:lpcstr; dwType:DWord):HRESULT;StdCall;external External_library name 'SHStartNetConnectionDialogA';
+  {$endif}
+
   function SHDefExtractIconA(pszIconFile:lpcstr; iIndex:Longint; uFlags:UINT; phiconLarge:PHICON; phiconSmall:PHICON; 
              nIconSize:UINT):HRESULT;StdCall;external External_library name 'SHDefExtractIconA';
   function SHDefExtractIconW(pszIconFile:lpcwstr; iIndex:Longint; uFlags:UINT; phiconLarge:PHICON; phiconSmall:PHICON; 
              nIconSize:UINT):HRESULT;StdCall;external External_library name 'SHDefExtractIconW';
+  {$ifdef Unicode}
+  function SHDefExtractIcon (pszIconFile:lpcwstr; iIndex:Longint; uFlags:UINT; phiconLarge:PHICON; phiconSmall:PHICON;
+             nIconSize:UINT):HRESULT;StdCall;external External_library name 'SHDefExtractIconW';
+  {$else}
+  function SHDefExtractIcon (pszIconFile:lpcstr; iIndex:Longint; uFlags:UINT; phiconLarge:PHICON; phiconSmall:PHICON;
+             nIconSize:UINT):HRESULT;StdCall;external External_library name 'SHDefExtractIconA';
+  {$endif}
   function Shell_GetImageLists(var phiml:HIMAGELIST; var phimlSmall:HIMAGELIST):BOOL;StdCall;external External_library name 'Shell_GetImageLists';
   function Shell_GetCachedImageIndex(pszIconPath:lpcwstr; iIconIndex:Longint; uIconFlags:UINT):Longint;StdCall;external External_library name 'Shell_GetCachedImageIndex';
   function SHValidateUNC(hwndOwner:HWND; pszFile:LPWStr; fConnect:UINT):BOOL;StdCall;external External_library name 'SHValidateUNC';
@@ -2549,6 +2667,13 @@ Const External_Library = 'shell32';
              psb:IShellBrowser; pStartPage:lpcstr):BOOL;StdCall;external External_library name 'SHOpenPropSheetA';
   function SHOpenPropSheetW(pszCaption:lpcwstr; ahkeys:array of HKEY; cikeys:UINT; pclsidDefault:PCLSID; pdtobj:IDataObject; 
              psb:IShellBrowser; pStartPage:lpcwstr):BOOL;StdCall;external External_library name 'SHOpenPropSheetW';
+  {$ifdef Unicode}
+  function SHOpenPropSheet (pszCaption:lpcwstr; ahkeys:array of HKEY; cikeys:UINT; pclsidDefault:PCLSID; pdtobj:IDataObject;
+             psb:IShellBrowser; pStartPage:lpcwstr):BOOL;StdCall;external External_library name 'SHOpenPropSheetW';
+  {$else}
+  function SHOpenPropSheet (pszCaption:lpcstr; ahkeys:array of HKEY; cikeys:UINT; pclsidDefault:PCLSID; pdtobj:IDataObject;
+             psb:IShellBrowser; pStartPage:lpcstr):BOOL;StdCall;external External_library name 'SHOpenPropSheetA';
+  {$endif}
   function SHFind_InitMenuPopup(hmenu:HMENU; hwndOwner:HWND; idCmdFirst:UINT; idCmdLast:UINT):IContextMenu;StdCall;external External_library name 'SHFind_InitMenuPopup';
   function SHCreateShellFolderViewEx(pcsfv:LPCSFV; out ppsv:IShellView):HRESULT;StdCall;external External_library name 'SHCreateShellFolderViewEx';
   procedure SHGetSetSettings(lpss:LPSHELLSTATE; dwMask:DWord; bSet:BOOL);StdCall;external External_library name 'SHGetSetSettings';
@@ -2557,6 +2682,11 @@ Const External_Library = 'shell32';
   function SHParseDisplayName(pszName:PCWSTR; pbc:IBindCtx; var ppidl:LPITEMIDLIST; sfgaoIn:TSFGAOF; psfgaoOut:PSFGAOF):HRESULT;StdCall;external External_library name 'SHParseDisplayName';
   function SHPathPrepareForWriteA(hwnd:HWND; punkEnableModless:IUnknown; pszPath:lpcstr; dwFlags:DWord):HRESULT;StdCall;external External_library name 'SHPathPrepareForWriteA';
   function SHPathPrepareForWriteW(hwnd:HWND; punkEnableModless:IUnknown; pszPath:lpcwstr; dwFlags:DWord):HRESULT;StdCall;external External_library name 'SHPathPrepareForWriteW';
+  {$ifdef Unicode}
+  function SHPathPrepareForWrite (hwnd:HWND; punkEnableModless:IUnknown; pszPath:lpcwstr; dwFlags:DWord):HRESULT;StdCall;external External_library name 'SHPathPrepareForWriteW';
+  {$else}
+  function SHPathPrepareForWrite (hwnd:HWND; punkEnableModless:IUnknown; pszPath:lpcstr; dwFlags:DWord):HRESULT;StdCall;external External_library name 'SHPathPrepareForWriteA';
+  {$endif}
 {  function SHPropStgCreate(psstg:IPropertySetStorage; fmtid:TREFFMTID; pclsid:PCLSID; grfFlags:DWord; grfMode:DWord; 
              dwDisposition:DWord; out ppstg:IPropertyStorage; puCodePage:PUINT):HRESULT;StdCall;external External_library name 'SHPropStgCreate';
   function SHPropStgReadMultiple(pps:IPropertyStorage; uCodePage:UINT; cpspec:ULONG; rgpspec:array of TPROPSPEC; rgvar:array of TPROPVARIANT):HRESULT;StdCall;external External_library name 'SHPropStgReadMultiple';
@@ -2565,6 +2695,11 @@ Const External_Library = 'shell32';
 }
   function SHCreateFileExtractIconA(pszFile:lpcstr; dwFileAttributes:DWord; riid:TREFIID; ppv:Ppointer):HRESULT;StdCall;external External_library name 'SHCreateFileExtractIconA';
   function SHCreateFileExtractIconW(pszFile:lpcwstr; dwFileAttributes:DWord; riid:TREFIID; ppv:Ppointer):HRESULT;StdCall;external External_library name 'SHCreateFileExtractIconW';
+  {$ifdef Unicode}
+  function SHCreateFileExtractIcon (pszFile:lpcwstr; dwFileAttributes:DWord; riid:TREFIID; ppv:Ppointer):HRESULT;StdCall;external External_library name 'SHCreateFileExtractIconW';
+  {$else}
+  function SHCreateFileExtractIcon (pszFile:lpcstr; dwFileAttributes:DWord; riid:TREFIID; ppv:Ppointer):HRESULT;StdCall;external External_library name 'SHCreateFileExtractIconA';
+  {$endif}
   function SHLimitInputEdit(hwndEdit:HWND; psf:IShellFolder):HRESULT;StdCall;external External_library name 'SHLimitInputEdit';
   function SHMultiFileProperties(pdtobj:IDataObject; dwFlags:DWord):HRESULT;StdCall;external External_library name 'SHMultiFileProperties';
 //  function SHMapIDListToImageListIndexAsync(pts:IShellTaskScheduler; psf:IShellFolder; pidl:LPCITEMIDLIST; flags:UINT; pfn:TPFNASYNCICONTASKBALLBACK; 

+ 8 - 8
rtl/win/wininc/ascfun.inc

@@ -251,8 +251,8 @@ function GetTabbedTextExtentA(hDC:HDC; lpString:LPCSTR; nCount:longint; nTabPosi
 function SetPropA(hWnd:HWND; lpString:LPCSTR; hData:HANDLE):WINBOOL; external 'user32' name 'SetPropA';
 function GetPropA(hWnd:HWND; lpString:LPCSTR):HANDLE; external 'user32' name 'GetPropA';
 function RemovePropA(hWnd:HWND; lpString:LPCSTR):HANDLE; external 'user32' name 'RemovePropA';
-function EnumPropsExA(hWnd:HWND; lpEnumFunc:PROPENUMPROCEX; lParam:LPARAM):longint; external 'user32' name 'EnumPropsExA';
-function EnumPropsA(hWnd:HWND; lpEnumFunc:PROPENUMPROC):longint; external 'user32' name 'EnumPropsA';
+function EnumPropsExA(hWnd:HWND; lpEnumFunc:PROPENUMPROCEXA; lParam:LPARAM):longint; external 'user32' name 'EnumPropsExA';
+function EnumPropsA(hWnd:HWND; lpEnumFunc:PROPENUMPROCA):longint; external 'user32' name 'EnumPropsA';
 function SetWindowTextA(hWnd:HWND; lpString:LPCSTR):WINBOOL; external 'user32' name 'SetWindowTextA';
 function GetWindowTextA(hWnd:HWND; lpString:LPSTR; nMaxCount:longint):longint; external 'user32' name 'GetWindowTextA';
 function GetWindowTextLengthA(hWnd:HWND):longint; external 'user32' name 'GetWindowTextLengthA';
@@ -340,7 +340,7 @@ function GetLogColorSpaceA(_para1:HCOLORSPACE; _para2:LPLOGCOLORSPACE; _para3:DW
 function GetICMProfileA(_para1:HDC; _para2:DWORD; _para3:LPSTR):WINBOOL; external 'gdi32' name 'GetICMProfileA';
 function SetICMProfileA(_para1:HDC; _para2:LPSTR):WINBOOL; external 'gdi32' name 'SetICMProfileA';
 function UpdateICMRegKeyA(_para1:DWORD; _para2:DWORD; _para3:LPSTR; _para4:UINT):WINBOOL; external 'gdi32' name 'UpdateICMRegKeyA';
-function EnumICMProfilesA(_para1:HDC; _para2:ICMENUMPROC; _para3:LPARAM):longint; external 'gdi32' name 'EnumICMProfilesA';
+function EnumICMProfilesA(_para1:HDC; _para2:ICMENUMPROCA; _para3:LPARAM):longint; external 'gdi32' name 'EnumICMProfilesA';
 {
 function PropertySheetA(lppsph:LPCPROPSHEETHEADER):longint; external 'comctl32' name 'PropertySheetA';
 function ImageList_LoadImageA(hi:HINST; lpbmp:LPCSTR; cx:longint; cGrow:longint; crMask:COLORREF;uType:UINT; uFlags:UINT):HIMAGELIST; external 'comctl32' name 'ImageList_LoadImageA';
@@ -408,14 +408,14 @@ function GetTimeFormatA(Locale:LCID; dwFlags:DWORD; lpTime:LPSYSTEMTIME; lpForma
 function GetDateFormatA(Locale:LCID; dwFlags:DWORD; lpDate:LPSYSTEMTIME; lpFormat:LPCSTR; lpDateStr:LPSTR;cchDate:longint):longint; external 'kernel32' name 'GetDateFormatA';
 function GetNumberFormatA(Locale:LCID; dwFlags:DWORD; lpValue:LPCSTR; lpFormat:PNUMBERFMT; lpNumberStr:LPSTR;cchNumber:longint):longint; external 'kernel32' name 'GetNumberFormatA';
 function GetCurrencyFormatA(Locale:LCID; dwFlags:DWORD; lpValue:LPCSTR; lpFormat:PCURRENCYFMT; lpCurrencyStr:LPSTR;cchCurrency:longint):longint; external 'kernel32' name 'GetCurrencyFormatA';
-function EnumCalendarInfoA(lpCalInfoEnumProc:CALINFO_ENUMPROC; Locale:LCID; Calendar:CALID; CalType:CALTYPE):WINBOOL; external 'kernel32' name 'EnumCalendarInfoA';
-function EnumTimeFormatsA(lpTimeFmtEnumProc:TIMEFMT_ENUMPROC; Locale:LCID; dwFlags:DWORD):WINBOOL; external 'kernel32' name 'EnumTimeFormatsA';
-function EnumDateFormatsA(lpDateFmtEnumProc:DATEFMT_ENUMPROC; Locale:LCID; dwFlags:DWORD):WINBOOL; external 'kernel32' name 'EnumDateFormatsA';
+function EnumCalendarInfoA(lpCalInfoEnumProc:CALINFO_ENUMPROCA; Locale:LCID; Calendar:CALID; CalType:CALTYPE):WINBOOL; external 'kernel32' name 'EnumCalendarInfoA';
+function EnumTimeFormatsA(lpTimeFmtEnumProc:TIMEFMT_ENUMPROCA; Locale:LCID; dwFlags:DWORD):WINBOOL; external 'kernel32' name 'EnumTimeFormatsA';
+function EnumDateFormatsA(lpDateFmtEnumProc:DATEFMT_ENUMPROCA; Locale:LCID; dwFlags:DWORD):WINBOOL; external 'kernel32' name 'EnumDateFormatsA';
 function GetStringTypeExA(Locale:LCID; dwInfoType:DWORD; lpSrcStr:LPCSTR; cchSrc:longint; lpCharType:LPWORD):WINBOOL; external 'kernel32' name 'GetStringTypeExA';
 function GetStringTypeA(Locale:LCID; dwInfoType:DWORD; lpSrcStr:LPCSTR; cchSrc:longint; lpCharType:LPWORD):WINBOOL; external 'kernel32' name 'GetStringTypeA';
 function FoldStringA(dwMapFlags:DWORD; lpSrcStr:LPCSTR; cchSrc:longint; lpDestStr:LPSTR; cchDest:longint):longint; external 'kernel32' name 'FoldStringA';
-function EnumSystemLocalesA(lpLocaleEnumProc:LOCALE_ENUMPROC; dwFlags:DWORD):WINBOOL; external 'kernel32' name 'EnumSystemLocalesA';
-function EnumSystemCodePagesA(lpCodePageEnumProc:CODEPAGE_ENUMPROC; dwFlags:DWORD):WINBOOL; external 'kernel32' name 'EnumSystemCodePagesA';
+function EnumSystemLocalesA(lpLocaleEnumProc:LOCALE_ENUMPROCA; dwFlags:DWORD):WINBOOL; external 'kernel32' name 'EnumSystemLocalesA';
+function EnumSystemCodePagesA(lpCodePageEnumProc:CODEPAGE_ENUMPROCA; dwFlags:DWORD):WINBOOL; external 'kernel32' name 'EnumSystemCodePagesA';
 function PeekConsoleInputA(hConsoleInput:HANDLE; lpBuffer:PINPUTRECORD; nLength:DWORD; lpNumberOfEventsRead:LPDWORD):WINBOOL; external 'kernel32' name 'PeekConsoleInputA';
 function ReadConsoleInputA(hConsoleInput:HANDLE; lpBuffer:PINPUTRECORD; nLength:DWORD; lpNumberOfEventsRead:LPDWORD):WINBOOL; external 'kernel32' name 'ReadConsoleInputA';
 function WriteConsoleInputA(hConsoleInput:HANDLE; lpBuffer:PINPUTRECORD; nLength:DWORD; lpNumberOfEventsWritten:LPDWORD):WINBOOL; external 'kernel32' name 'WriteConsoleInputA';

+ 41 - 11
rtl/win/wininc/base.inc

@@ -366,7 +366,11 @@
 
   MakeIntResourceA = PAnsiChar;
   MakeIntResourceW = PWideChar;
-  MakeIntResource = MakeIntResourceA;
+  {$ifdef UNICODE}
+    MakeIntResource = MakeIntResourceW;
+  {$else}
+    MakeIntResource = MakeIntResourceA;
+  {$endif}
 
   { was #define dname(params) def_expr }
   { argument types are unknown }
@@ -605,9 +609,13 @@
 
      DRAWSTATEPROC = function (_para1:HDC; _para2:LPARAM; _para3:WPARAM; _para4:longint; _para5:longint):WINBOOL;stdcall;
 
-     PROPENUMPROCEX = function (_para1:HWND; _para2:LPCTSTR; _para3:HANDLE; _para4:DWORD):WINBOOL;stdcall;
+     PROPENUMPROCEXA = function (_para1:HWND; _para2:LPCSTR;  _para3:HANDLE; _para4:DWORD):WINBOOL;stdcall;
+     PROPENUMPROCEXW = function (_para1:HWND; _para2:LPCWSTR; _para3:HANDLE; _para4:DWORD):WINBOOL;stdcall;
+     PROPENUMPROCEX  = function (_para1:HWND; _para2:LPCTSTR; _para3:HANDLE; _para4:DWORD):WINBOOL;stdcall;
 
-     PROPENUMPROC = function (_para1:HWND; _para2:LPCTSTR; _para3:HANDLE):WINBOOL;stdcall;
+     PROPENUMPROCA = function (_para1:HWND; _para2:LPCSTR;  _para3:HANDLE):WINBOOL;stdcall;
+     PROPENUMPROCW = function (_para1:HWND; _para2:LPCWSTR; _para3:HANDLE):WINBOOL;stdcall;
+     PROPENUMPROC  = function (_para1:HWND; _para2:LPCTSTR; _para3:HANDLE):WINBOOL;stdcall;
 
      HOOKPROC = function (_para1:longint; _para2:WPARAM; _para3:LPARAM):LRESULT;stdcall;
 
@@ -621,31 +629,49 @@
 
      LPPAGESETUPHOOK = function (_para1:HWND; _para2:UINT; _para3:WPARAM; _para4:LPARAM):UINT_PTR;stdcall;
 
-     ICMENUMPROC = function (_para1:LPTSTR; _para2:LPARAM):longint;stdcall;
+     ICMENUMPROCA = function (_para1:LPSTR;  _para2:LPARAM):longint;stdcall;
+     ICMENUMPROCW = function (_para1:LPWSTR; _para2:LPARAM):longint;stdcall;
+     ICMENUMPROC = function  (_para1:LPTSTR; _para2:LPARAM):longint;stdcall;
 
      EDITWORDBREAKPROCEX = function (_para1:pchar; _para2:LONG; _para3:BYTE; _para4:WINT):LONG;stdcall;
 
      PFNLVCOMPARE = function (_para1:LPARAM; _para2:LPARAM; _para3:LPARAM):longint;stdcall;
 
-     LOCALE_ENUMPROC = function (_para1:LPTSTR):WINBOOL;stdcall;
+     LOCALE_ENUMPROCA = function (_para1:LPSTR):WINBOOL;stdcall;
+     LOCALE_ENUMPROCW = function (_para1:LPWSTR):WINBOOL;stdcall;
+     LOCALE_ENUMPROC  = function (_para1:LPTSTR):WINBOOL;stdcall;
 
-     CODEPAGE_ENUMPROC = function (_para1:LPTSTR):WINBOOL;stdcall;
+     CODEPAGE_ENUMPROCA = function (_para1:LPSTR):WINBOOL;stdcall;
+     CODEPAGE_ENUMPROCW = function (_para1:LPWSTR):WINBOOL;stdcall;
+     CODEPAGE_ENUMPROC  = function (_para1:LPTSTR):WINBOOL;stdcall;
 
-     DATEFMT_ENUMPROC = function (_para1:LPTSTR):WINBOOL;stdcall;
+     DATEFMT_ENUMPROCA = function (_para1:LPSTR):WINBOOL;stdcall;
+     DATEFMT_ENUMPROCW = function (_para1:LPWSTR):WINBOOL;stdcall;
+     DATEFMT_ENUMPROC  = function (_para1:LPTSTR):WINBOOL;stdcall;
 
-     TIMEFMT_ENUMPROC = function (_para1:LPTSTR):WINBOOL;stdcall;
+     TIMEFMT_ENUMPROCA = function (_para1:LPSTR):WINBOOL;stdcall;
+     TIMEFMT_ENUMPROCW = function (_para1:LPWSTR):WINBOOL;stdcall;
+     TIMEFMT_ENUMPROC  = function (_para1:LPTSTR):WINBOOL;stdcall;
 
+     CALINFO_ENUMPROCA= function (_para1:LPSTR):WINBOOL;stdcall;
+     CALINFO_ENUMPROCW= function (_para1:LPWSTR):WINBOOL;stdcall;
      CALINFO_ENUMPROC = function (_para1:LPTSTR):WINBOOL;stdcall;
 
      PHANDLER_ROUTINE = function (_para1:DWORD):WINBOOL;stdcall;
 
      LPHANDLER_FUNCTION = function (_para1:DWORD):WINBOOL;stdcall;
 
-     PFNGETPROFILEPATH = function (_para1:LPCTSTR; _para2:LPSTR; _para3:UINT):UINT;stdcall;
+     PFNGETPROFILEPATHA = function (_para1:LPCSTR; _para2:LPSTR; _para3:UINT):UINT;stdcall;
+     PFNGETPROFILEPATHW = function (_para1:LPCWSTR; _para2:LPSTR; _para3:UINT):UINT;stdcall;
+     PFNGETPROFILEPATH  = function (_para1:LPCTSTR; _para2:LPSTR; _para3:UINT):UINT;stdcall;
 
-     PFNRECONCILEPROFILE = function (_para1:LPCTSTR; _para2:LPCTSTR; _para3:DWORD):UINT;stdcall;
+     PFNRECONCILEPROFILEA = function (_para1:LPCSTR; _para2:LPCSTR; _para3:DWORD):UINT;stdcall;
+     PFNRECONCILEPROFILEW = function (_para1:LPCWSTR; _para2:LPCWSTR; _para3:DWORD):UINT;stdcall;
+     PFNRECONCILEPROFILE  = function (_para1:LPCTSTR; _para2:LPCTSTR; _para3:DWORD):UINT;stdcall;
 
-     PFNPROCESSPOLICIES = function (_para1:HWND; _para2:LPCTSTR; _para3:LPCTSTR; _para4:LPCTSTR; _para5:DWORD):WINBOOL;stdcall;
+     PFNPROCESSPOLICIESA = function (_para1:HWND; _para2:LPCSTR; _para3:LPCSTR; _para4:LPCSTR; _para5:DWORD):WINBOOL;stdcall;
+     PFNPROCESSPOLICIESW = function (_para1:HWND; _para2:LPCWSTR; _para3:LPCWSTR; _para4:LPCWSTR; _para5:DWORD):WINBOOL;stdcall;
+     PFNPROCESSPOLICIES  = function (_para1:HWND; _para2:LPCTSTR; _para3:LPCTSTR; _para4:LPCTSTR; _para5:DWORD):WINBOOL;stdcall;
   (*  Not convertable by H2PAS
   #define SECURITY_NULL_SID_AUTHORITY     {0,0,0,0,0,0}
   #define SECURITY_WORLD_SID_AUTHORITY    {0,0,0,0,0,1}
@@ -687,10 +713,14 @@
    }
      SERVICES_ACTIVE_DATABASEA = 'ServicesActive';
      SERVICES_FAILED_DATABASEA = 'ServicesFailed';
+     SERVICES_ACTIVE_DATABASEW = 'ServicesActive'#0000;
+     SERVICES_FAILED_DATABASEW = 'ServicesFailed'#0000;
+
   {  Not convertable by H2PAS
   #define SC_GROUP_IDENTIFIERW           L'+'
    }
      SC_GROUP_IDENTIFIERA = '+';
+     SC_GROUP_IDENTIFIERW = '+'#0000;
 {$ifdef UNICODE}
      SERVICES_ACTIVE_DATABASE = SERVICES_ACTIVE_DATABASEW;
      SERVICES_FAILED_DATABASE = SERVICES_FAILED_DATABASEW;

+ 1 - 1
rtl/win/wininc/func.inc

@@ -1422,7 +1422,7 @@ end;
 
 function Animate_Create(hWndP:HWND; id:HMENU;dwStyle:DWORD;hInstance:HINST):HWND;
 begin
-  Animate_Create:=CreateWindow(LPCSTR(ANIMATE_CLASS),nil,dwStyle,0,0,0,0,hwndP,id,hInstance,nil);
+  Animate_Create:=CreateWindow(LPCTSTR(ANIMATE_CLASS),nil,dwStyle,0,0,0,0,hwndP,id,hInstance,nil);
 end;
 
 

+ 1 - 2
rtl/win/wininc/unidef.inc

@@ -116,7 +116,7 @@ function QueryDosDevice(lpDeviceName:LPCWSTR; lpTargetPath:LPWSTR; ucchMax:DWORD
 function CreateFile(lpFileName:LPCWSTR; dwDesiredAccess:DWORD; dwShareMode:DWORD; lpSecurityAttributes:LPSECURITY_ATTRIBUTES; dwCreationDisposition:DWORD;dwFlagsAndAttributes:DWORD; hTemplateFile:HANDLE):HANDLE; external 'kernel32' name 'CreateFileW';
 function SetFileAttributes(lpFileName:LPCWSTR; dwFileAttributes:DWORD):WINBOOL; external 'kernel32' name 'SetFileAttributesW';
 function GetFileAttributes(lpFileName:LPCWSTR):DWORD; external 'kernel32' name 'GetFileAttributesW';
-function GetFileAttributesExW(lpFileName:LPCWSTR; fInfoLevelId:GET_FILEEX_INFO_LEVELS; lpFileInformation:LPVOID):BOOL; external 'kernel32' name 'GetFileAttributesExW';
+function GetFileAttributesEx(lpFileName:LPCWSTR; fInfoLevelId:GET_FILEEX_INFO_LEVELS; lpFileInformation:LPVOID):BOOL; external 'kernel32' name 'GetFileAttributesExW';
 function GetCompressedFileSize(lpFileName:LPCWSTR; lpFileSizeHigh:LPDWORD):DWORD; external 'kernel32' name 'GetCompressedFileSizeW';
 function DeleteFile(lpFileName:LPCWSTR):WINBOOL; external 'kernel32' name 'DeleteFileW';
 function SearchPath(lpPath:LPCWSTR; lpFileName:LPCWSTR; lpExtension:LPCWSTR; nBufferLength:DWORD; lpBuffer:LPWSTR;lpFilePart:LPWSTR):DWORD; external 'kernel32' name 'SearchPathW';
@@ -354,7 +354,6 @@ procedure GetStartupInfo(lpStartupInfo:LPSTARTUPINFO); external 'kernel32' name
 function FindFirstFile(lpFileName:LPCWSTR; lpFindFileData:LPWIN32_FIND_DATA):HANDLE; external 'kernel32' name 'FindFirstFileW';
 function FindNextFile(hFindFile:HANDLE; lpFindFileData:LPWIN32_FIND_DATA):WINBOOL; external 'kernel32' name 'FindNextFileW';
 function GetVersionEx(VersionInformation:LPOSVERSIONINFOW):WINBOOL; external 'kernel32' name 'GetVersionExW';
-function GetVersionExW(VersionInformation:LPOSVERSIONINFOW):WINBOOL; external 'kernel32' name 'GetVersionExW';
 function CreateWindow(lpClassName:LPCWSTR; lpWindowName:LPCWSTR; dwStyle:DWORD; X:longint;Y:longint; nWidth:longint; nHeight:longint; hWndParent:HWND; hMenu:HMENU;hInstance:HINST; lpParam:LPVOID):HWND;
 function CreateDialog(hInstance:HINST; lpName:LPCWSTR; hWndParent:HWND; lpDialogFunc:DLGPROC):HWND;
 function CreateDialogIndirect(hInstance:HINST; lpTemplate:LPCDLGTEMPLATE; hWndParent:HWND; lpDialogFunc:DLGPROC):HWND;