- replaced function pointers with delay loading --- juergen.schmied@debitel.net
Index: wine/dlls/shlwapi/Makefile.in =================================================================== RCS file: /home/wine/wine/dlls/shlwapi/Makefile.in,v retrieving revision 1.21 diff -d -u -r1.21 Makefile.in --- wine/dlls/shlwapi/Makefile.in 22 Jul 2002 20:32:53 -0000 1.21 +++ wine/dlls/shlwapi/Makefile.in 24 Jul 2002 19:21:55 -0000 @@ -4,8 +4,8 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = shlwapi.dll -# fixme: avoid ole32.dll import -IMPORTS = ole32 user32 gdi32 advapi32 kernel32 +IMPORTS = advapi32 gdi32 kernel32 user32 +DELAYIMPORTS = comctl32 comdlg32 mpr ole32 shell32 version winmm EXTRALIBS = $(LIBUUID) $(LIBUNICODE) LDDLLFLAGS = @LDDLLFLAGS@ @@ -33,3 +33,5 @@ @MAKE_DLL_RULES@ ### Dependencies: + + Index: wine/dlls/shlwapi/ordinal.c =================================================================== RCS file: /home/wine/wine/dlls/shlwapi/ordinal.c,v retrieving revision 1.49 diff -d -u -r1.49 ordinal.c --- wine/dlls/shlwapi/ordinal.c 23 Jul 2002 01:59:46 -0000 1.49 +++ wine/dlls/shlwapi/ordinal.c 24 Jul 2002 19:21:59 -0000 @@ -2,7 +2,7 @@ * SHLWAPI ordinal functions * * Copyright 1997 Marcus Meissner - * 1998 Jürgen Schmied + * 1998 Jrgen Schmied * 2001 Jon Griffiths * * This library is free software; you can redistribute it and/or @@ -115,27 +115,7 @@ }; /* function pointers for GET_FUNC macro; these need to be global because of gcc bug */ -static LPITEMIDLIST (WINAPI *pSHBrowseForFolderW)(LPBROWSEINFOW); static HRESULT (WINAPI *pConvertINetUnicodeToMultiByte)(LPDWORD,DWORD,LPCWSTR,LPINT,LPSTR,LPINT); -static BOOL (WINAPI *pPlaySoundW)(LPCWSTR, HMODULE, DWORD); -static DWORD (WINAPI *pSHGetFileInfoW)(LPCWSTR,DWORD,SHFILEINFOW*,UINT,UINT); -static UINT (WINAPI *pDragQueryFileW)(HDROP, UINT, LPWSTR, UINT); -static BOOL (WINAPI *pSHGetPathFromIDListW)(LPCITEMIDLIST, LPWSTR); -static BOOL (WINAPI *pShellExecuteExW)(LPSHELLEXECUTEINFOW); -static HICON (WINAPI *pSHFileOperationW)(LPSHFILEOPSTRUCTW); -static HICON (WINAPI *pExtractIconExW)(LPCWSTR, INT,HICON *,HICON *, UINT); -static BOOL (WINAPI *pSHGetNewLinkInfoW)(LPCWSTR, LPCWSTR, LPCWSTR, BOOL*, UINT); -static DWORD (WINAPI *pSHDefExtractIconW)(LPVOID, LPVOID, LPVOID, LPVOID, LPVOID, LPVOID); /* FIXME: Correct args */ -static HICON (WINAPI *pExtractIconW)(HINSTANCE, LPCWSTR, UINT); -static BOOL (WINAPI *pGetSaveFileNameW)(LPOPENFILENAMEW); -static DWORD (WINAPI *pWNetRestoreConnectionW)(LPVOID, LPVOID); /* FIXME: Correct args */ -static DWORD (WINAPI *pWNetGetLastErrorW)(LPVOID, LPVOID, LPVOID, LPVOID, LPVOID); /* FIXME: Correct args */ -static BOOL (WINAPI *pPageSetupDlgW)(LPPAGESETUPDLGW); -static BOOL (WINAPI *pPrintDlgW)(LPPRINTDLGW); -static BOOL (WINAPI *pGetOpenFileNameW)(LPOPENFILENAMEW); -static DWORD (WINAPI *pGetFileVersionInfoSizeW)(LPCWSTR,LPDWORD); -static BOOL (WINAPI *pGetFileVersionInfoW)(LPCWSTR,DWORD,DWORD,LPVOID); -static WORD (WINAPI *pVerQueryValueW)(LPVOID,LPCWSTR,LPVOID*,UINT*); /* NOTES: Most functions exported by ordinal seem to be superflous. @@ -1185,7 +1165,7 @@ return E_FAIL; } /************************************************************************* - * @ [SHLWAPI.176] + * _IUnknown_QueryService [SHLWAPI.176] * * _IUnknown_QueryService * @@ -1351,6 +1331,8 @@ /************************************************************************* * @ [SHLWAPI.215] * + * _SHAnsiToUnicode + * * NOTES * check me! */ @@ -1359,12 +1341,11 @@ LPWSTR lpwStrDest, int len) { - INT len_a, ret; + INT ret; - len_a = lstrlenA(lpStrSrc); - ret = MultiByteToWideChar(0, 0, lpStrSrc, len_a, lpwStrDest, len); - TRACE("%s %s %d, ret=%d\n", - debugstr_a(lpStrSrc), debugstr_w(lpwStrDest), len, ret); + ret = MultiByteToWideChar(0, 0, lpStrSrc, -1, lpwStrDest, len); + if (!ret) ((LPWSTR)lpwStrDest)[len-1] = 0; + TRACE("%s %s %d, ret=%d\n", debugstr_a(lpStrSrc), debugstr_w(lpwStrDest), len, ret); return ret; } @@ -1528,6 +1509,26 @@ } /************************************************************************* + * @ [SHLWAPI.222] + * + * _SHGlobalCounterCreate + * + * NOTES + * securityattributes missing + */ +HANDLE WINAPI SHLWAPI_222 (LPCLSID guid) +{ + char lpstrName[80]; + + sprintf( lpstrName, "shell.{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + guid->Data1, guid->Data2, guid->Data3, + guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], + guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] ); + TRACE("(%s)\n", lpstrName); + return CreateSemaphoreA(NULL,0, 0x7fffffff, lpstrName); +} + +/************************************************************************* * @ [SHLWAPI.236] */ HMODULE WINAPI SHLWAPI_236 (REFIID lpUnknown) @@ -1600,16 +1601,19 @@ /************************************************************************* * @ [SHLWAPI.241] * + * _StopWatchMode */ DWORD WINAPI SHLWAPI_241 () { FIXME("()stub\n"); - return /* 0xabba1243 */ 0; + return 0; } /************************************************************************* * @ [SHLWAPI.266] * + * _SHRestrictionLookup + * * native does at least approximately: * strcpyW(newstr, x); * strcatW(newstr, "\\Restrictions"); @@ -1624,7 +1628,7 @@ LPVOID z) { FIXME("(%p %p %p %p)stub\n",w,x,y,z); - return /* 0xabba1248 */ 0; + return 0; } /************************************************************************* @@ -1772,17 +1776,6 @@ } /************************************************************************* - * @ [SHLWAPI.289] - * - * Late bound call to winmm.PlaySoundW - */ -BOOL WINAPI SHLWAPI_289(LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound) -{ - GET_FUNC(pPlaySoundW, winmm, "PlaySoundW", FALSE); - return pPlaySoundW(pszSound, hmod, fdwSound); -} - -/************************************************************************* * @ [SHLWAPI.294] */ BOOL WINAPI SHLWAPI_294(LPSTR str1, LPSTR str2, LPSTR pStr, DWORD some_len, LPCSTR lpStr2) @@ -1824,87 +1817,9 @@ } /************************************************************************* - * @ [SHLWAPI.313] - * - * Late bound call to shell32.SHGetFileInfoW - */ -DWORD WINAPI SHLWAPI_313(LPCWSTR path, DWORD dwFileAttributes, - SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags) -{ - GET_FUNC(pSHGetFileInfoW, shell32, "SHGetFileInfoW", 0); - return pSHGetFileInfoW(path, dwFileAttributes, psfi, sizeofpsfi, flags); -} - -/************************************************************************* - * @ [SHLWAPI.318] - * - * Late bound call to shell32.DragQueryFileW - */ -UINT WINAPI SHLWAPI_318(HDROP hDrop, UINT lFile, LPWSTR lpszFile, UINT lLength) -{ - GET_FUNC(pDragQueryFileW, shell32, "DragQueryFileW", 0); - return pDragQueryFileW(hDrop, lFile, lpszFile, lLength); -} - -/************************************************************************* - * @ [SHLWAPI.333] - * - * Late bound call to shell32.SHBrowseForFolderW - */ -LPITEMIDLIST WINAPI SHLWAPI_333(LPBROWSEINFOW lpBi) -{ - GET_FUNC(pSHBrowseForFolderW, shell32, "SHBrowseForFolderW", NULL); - return pSHBrowseForFolderW(lpBi); -} - -/************************************************************************* - * @ [SHLWAPI.334] - * - * Late bound call to shell32.SHGetPathFromIDListW - */ -BOOL WINAPI SHLWAPI_334(LPCITEMIDLIST pidl,LPWSTR pszPath) -{ - GET_FUNC(pSHGetPathFromIDListW, shell32, "SHGetPathFromIDListW", 0); - return pSHGetPathFromIDListW(pidl, pszPath); -} - -/************************************************************************* - * @ [SHLWAPI.335] - * - * Late bound call to shell32.ShellExecuteExW - */ -BOOL WINAPI SHLWAPI_335(LPSHELLEXECUTEINFOW lpExecInfo) -{ - GET_FUNC(pShellExecuteExW, shell32, "ShellExecuteExW", FALSE); - return pShellExecuteExW(lpExecInfo); -} - -/************************************************************************* - * @ [SHLWAPI.336] - * - * Late bound call to shell32.SHFileOperationW. - */ -DWORD WINAPI SHLWAPI_336(LPSHFILEOPSTRUCTW lpFileOp) -{ - GET_FUNC(pSHFileOperationW, shell32, "SHFileOperationW", 0); - return pSHFileOperationW(lpFileOp); -} - -/************************************************************************* - * @ [SHLWAPI.337] - * - * Late bound call to shell32.ExtractIconExW. - */ -HICON WINAPI SHLWAPI_337(LPCWSTR lpszFile, INT nIconIndex, HICON *phiconLarge, - HICON *phiconSmall, UINT nIcons) -{ - GET_FUNC(pExtractIconExW, shell32, "ExtractIconExW", (HICON)0); - return pExtractIconExW(lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); -} - -/************************************************************************* * @ [SHLWAPI.342] * + * _SHInterlockedCompareExchange */ LONG WINAPI SHInterlockedCompareExchange( PLONG dest, LONG xchg, LONG compare) { @@ -1925,77 +1840,6 @@ } /************************************************************************* - * @ [SHLWAPI.350] - * - * seems to be late bound call to GetFileVersionInfoSizeW - */ -DWORD WINAPI SHLWAPI_350 ( - LPWSTR x, - LPVOID y) -{ - DWORD ret; - - GET_FUNC(pGetFileVersionInfoSizeW, version, "GetFileVersionInfoSizeW", 0); - ret = pGetFileVersionInfoSizeW(x, y); - return 0x208 + ret; -} - -/************************************************************************* - * @ [SHLWAPI.351] - * - * seems to be late bound call to GetFileVersionInfoW - */ -BOOL WINAPI SHLWAPI_351 ( - LPWSTR w, /* [in] path to dll */ - DWORD x, /* [in] parm 2 to GetFileVersionInfoA */ - DWORD y, /* [in] return value from .350 - assume length */ - LPVOID z) /* [in/out] buffer (+0x208 sent to GetFileVersionInfoA) */ -{ - GET_FUNC(pGetFileVersionInfoW, version, "GetFileVersionInfoW", 0); - return pGetFileVersionInfoW(w, x, y-0x208, (char*)z+0x208); -} - -/************************************************************************* - * @ [SHLWAPI.352] - * - * seems to be late bound call to VerQueryValueW - */ -WORD WINAPI SHLWAPI_352 ( - LPVOID w, /* [in] buffer from _351 */ - LPWSTR x, /* [in] value to retrieve - - converted and passed to VerQueryValueA as #2 */ - LPVOID y, /* [out] ver buffer - passed to VerQueryValueA as #3 */ - UINT* z) /* [in] ver length - passed to VerQueryValueA as #4 */ -{ - GET_FUNC(pVerQueryValueW, version, "VerQueryValueW", 0); - return pVerQueryValueW((char*)w+0x208, x, y, z); -} - -/************************************************************************* - * @ [SHLWAPI.357] - * - * Late bound call to shell32.SHGetNewLinkInfoW - */ -BOOL WINAPI SHLWAPI_357(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName, - BOOL *pfMustCopy, UINT uFlags) -{ - GET_FUNC(pSHGetNewLinkInfoW, shell32, "SHGetNewLinkInfoW", FALSE); - return pSHGetNewLinkInfoW(pszLinkTo, pszDir, pszName, pfMustCopy, uFlags); -} - -/************************************************************************* - * @ [SHLWAPI.358] - * - * Late bound call to shell32.SHDefExtractIconW - */ -DWORD WINAPI SHLWAPI_358(LPVOID arg1, LPVOID arg2, LPVOID arg3, LPVOID arg4, - LPVOID arg5, LPVOID arg6) -{ - GET_FUNC(pSHDefExtractIconW, shell32, "SHDefExtractIconW", 0); - return pSHDefExtractIconW(arg1, arg2, arg3, arg4, arg5, arg6); -} - -/************************************************************************* * @ [SHLWAPI.364] * * Wrapper for lstrcpynA with src and dst swapped. @@ -2007,18 +1851,6 @@ } /************************************************************************* - * @ [SHLWAPI.370] - * - * Late bound call to shell32.ExtractIconW - */ -HICON WINAPI SHLWAPI_370(HINSTANCE hInstance, LPCWSTR lpszExeFileName, - UINT nIconIndex) -{ - GET_FUNC(pExtractIconW, shell32, "ExtractIconW", (HICON)0); - return pExtractIconW(hInstance, lpszExeFileName, nIconIndex); -} - -/************************************************************************* * @ [SHLWAPI.376] */ LANGID WINAPI SHLWAPI_376 () @@ -2089,73 +1921,6 @@ return 0; } -/************************************************************************* - * @ [SHLWAPI.389] - * - * Late bound call to comdlg32.GetSaveFileNameW - */ -BOOL WINAPI SHLWAPI_389(LPOPENFILENAMEW ofn) -{ - GET_FUNC(pGetSaveFileNameW, comdlg32, "GetSaveFileNameW", FALSE); - return pGetSaveFileNameW(ofn); -} - -/************************************************************************* - * @ [SHLWAPI.390] - * - * Late bound call to mpr.WNetRestoreConnectionW - */ -DWORD WINAPI SHLWAPI_390(LPVOID arg1, LPVOID arg2) -{ - GET_FUNC(pWNetRestoreConnectionW, mpr, "WNetRestoreConnectionW", 0); - return pWNetRestoreConnectionW(arg1, arg2); -} - -/************************************************************************* - * @ [SHLWAPI.391] - * - * Late bound call to mpr.WNetGetLastErrorW - */ -DWORD WINAPI SHLWAPI_391(LPVOID arg1, LPVOID arg2, LPVOID arg3, LPVOID arg4, - LPVOID arg5) -{ - GET_FUNC(pWNetGetLastErrorW, mpr, "WNetGetLastErrorW", 0); - return pWNetGetLastErrorW(arg1, arg2, arg3, arg4, arg5); -} - -/************************************************************************* - * @ [SHLWAPI.401] - * - * Late bound call to comdlg32.PageSetupDlgW - */ -BOOL WINAPI SHLWAPI_401(LPPAGESETUPDLGW pagedlg) -{ - GET_FUNC(pPageSetupDlgW, comdlg32, "PageSetupDlgW", FALSE); - return pPageSetupDlgW(pagedlg); -} - -/************************************************************************* - * @ [SHLWAPI.402] - * - * Late bound call to comdlg32.PrintDlgW - */ -BOOL WINAPI SHLWAPI_402(LPPRINTDLGW printdlg) -{ - GET_FUNC(pPrintDlgW, comdlg32, "PrintDlgW", FALSE); - return pPrintDlgW(printdlg); -} - -/************************************************************************* - * @ [SHLWAPI.403] - * - * Late bound call to comdlg32.GetOpenFileNameW - */ -BOOL WINAPI SHLWAPI_403(LPOPENFILENAMEW ofn) -{ - GET_FUNC(pGetOpenFileNameW, comdlg32, "GetOpenFileNameW", FALSE); - return pGetOpenFileNameW(ofn); -} - /* INTERNAL: Map from HLS color space to RGB */ static WORD ConvertHue(int wHue, WORD wMid1, WORD wMid2) { @@ -2221,6 +1986,42 @@ } /************************************************************************* + * SHGlobalCounterCreateNamedA [SHLWAPI.422] + */ +HANDLE WINAPI SHLWAPI_422 (LPCSTR pwName, int nInitialCount) +{ + CHAR pwCounterName[MAX_PATH]; + HANDLE hSem; + + lstrcpyA(pwCounterName, "shell."); + lstrcatA(pwCounterName, pwName); + hSem = CreateSemaphoreA(NULL /* FIXME */, nInitialCount, MAXLONG, pwCounterName); + if (!hSem) { + OpenSemaphoreA( SYNCHRONIZE | SEMAPHORE_MODIFY_STATE, 0, pwCounterName); + } + return hSem; +} + +/************************************************************************* + * SHGlobalCounterCreateNamedW [SHLWAPI.423] + */ +HANDLE WINAPI SHLWAPI_423 (LPCWSTR pwName, int nInitialCount) +{ + WCHAR pwCounterName[MAX_PATH]; + WCHAR pwShell[7] = {'s','h','e','l','l','.','\0'}; + HANDLE hSem; + + lstrcpyW(pwCounterName, pwShell); + lstrcatW(pwCounterName, pwName); + hSem = CreateSemaphoreW(NULL /* FIXME */, nInitialCount, MAXLONG, pwCounterName); + if (!hSem) { + OpenSemaphoreW( SYNCHRONIZE | SEMAPHORE_MODIFY_STATE, 0, pwCounterName); + } + return hSem; +} + + +/************************************************************************* * @ [SHLWAPI.418] * * Function seems to do FreeLibrary plus other things. @@ -2355,6 +2156,8 @@ /************************************************************************* * @ [SHLWAPI.437] + * + * _IsOS * * NOTES * In the real shlwapi, One time initialisation calls GetVersionEx and reads Index: wine/dlls/shlwapi/path.c =================================================================== RCS file: /home/wine/wine/dlls/shlwapi/path.c,v retrieving revision 1.20 diff -d -u -r1.20 path.c --- wine/dlls/shlwapi/path.c 31 May 2002 23:40:52 -0000 1.20 +++ wine/dlls/shlwapi/path.c 24 Jul 2002 19:22:04 -0000 @@ -259,7 +259,7 @@ */ LPSTR WINAPI PathBuildRootA(LPSTR lpszPath, int drive) { - TRACE("(%p,%d)\n", debugstr_a(lpszPath), drive); + TRACE("(%p,%d)\n", lpszPath, drive); if (lpszPath && drive >= 0 && drive < 26) { @@ -278,7 +278,7 @@ */ LPWSTR WINAPI PathBuildRootW(LPWSTR lpszPath, int drive) { - TRACE("(%p,%d)\n",debugstr_w(lpszPath), drive); + TRACE("(%p,%d)\n",lpszPath, drive); if (lpszPath && drive >= 0 && drive < 26) { Index: wine/dlls/shlwapi/reg.c =================================================================== RCS file: /home/wine/wine/dlls/shlwapi/reg.c,v retrieving revision 1.29 diff -d -u -r1.29 reg.c --- wine/dlls/shlwapi/reg.c 20 Jul 2002 20:04:44 -0000 1.29 +++ wine/dlls/shlwapi/reg.c 24 Jul 2002 19:22:07 -0000 @@ -1618,3 +1618,13 @@ TRACE("new key is %08x\n", newKey); return newKey; } + + + + + + + + + + Index: wine/dlls/shlwapi/shlwapi.spec =================================================================== RCS file: /home/wine/wine/dlls/shlwapi/shlwapi.spec,v retrieving revision 1.45 diff -d -u -r1.45 shlwapi.spec --- wine/dlls/shlwapi/shlwapi.spec 22 Jul 2002 20:32:53 -0000 1.45 +++ wine/dlls/shlwapi/shlwapi.spec 24 Jul 2002 19:22:09 -0000 @@ -221,9 +221,9 @@ 219 stdcall @(long long long long) SHLWAPI_219 220 stub @ 221 stub @ -222 stdcall @(long) SHLWAPI_222 -223 stdcall @(long) SHLWAPI_223 -224 stdcall @(long) SHLWAPI_224 +222 stdcall @(long) _SHGlobalCounterCreate +223 stdcall @(long) _SHGlobalCounterGetValue +224 stdcall @(long) _SHGlobalCounterIncrement 225 stub @ 226 stub @ 227 stub @ @@ -288,7 +288,7 @@ 286 stub @ 287 stdcall @(ptr ptr) SHLWAPI_287 288 stub @ -289 stdcall @(wstr long long) SHLWAPI_289 +289 forward @ winmm.PlaySoundW 290 stub @ 291 stub @ 292 stub @ @@ -312,12 +312,12 @@ 310 forward @ kernel32.GetTimeFormatW 311 forward @ kernel32.GetDateFormatW 312 forward @ kernel32.GetPrivateProfileStringW -313 stdcall @(ptr long ptr long long) SHLWAPI_313 +313 forward @ shell32.SHGetFileInfoW 314 forward @ user32.RegisterClassExW 315 forward @ user32.GetClassInfoExW 316 stub SHCreateStreamOnFileAOld 317 stub SHCreateStreamOnFileWOld -318 stdcall @(long long wstr long) SHLWAPI_318 +318 forward @ shell32.DragQueryFileW 319 forward @ user32.FindWindowExW 320 stdcall @(str str) SHLWAPI_320 321 stdcall @(wstr wstr) SHLWAPI_321 @@ -332,11 +332,11 @@ 330 stub @ 331 stub @ 332 forward @ user32.CallMsgFilterW -333 stdcall @(ptr) SHLWAPI_333 -334 stdcall @(ptr wstr) SHLWAPI_334 -335 stdcall @(ptr) SHLWAPI_335 -336 stdcall @(ptr) SHLWAPI_336 -337 stdcall @(wstr long ptr ptr long) SHLWAPI_337 +333 forward @ shell32.SHBrowseForFolderW +334 forward @ shell32.SHGetPathFromIDListW +335 forward @ shell32.ShellExecuteExW +336 forward @ shell32.SHFileOperationW +337 forward @ shell32.ExtractIconExW 338 forward @ kernel32.SetFileAttributesW 339 forward @ kernel32.GetNumberFormatW 340 forward @ user32.MessageBoxW @@ -349,15 +349,15 @@ 347 forward @ advapi32.RegDeleteValueW 348 stub @ 349 stub @ -350 stdcall @(wstr ptr) SHLWAPI_350 -351 stdcall @(wstr ptr long ptr) SHLWAPI_351 -352 stdcall @(ptr wstr ptr ptr) SHLWAPI_352 +350 forward @ version.GetFileVersionInfoSizeW +351 forward @ version.GetFileVersionInfoW +352 forward @ version.VerQueryValueW 353 stub @ 354 stub @ 355 stub @ -356 stdcall @(ptr ptr) SHLWAPI_356 -357 stdcall @(wstr wstr wstr long long) SHLWAPI_357 -358 stdcall @(ptr ptr ptr ptr ptr ptr) SHLWAPI_358 +356 stdcall @(ptr ptr) _CreateAllAccessSecurityAttributes +357 forward @ shell32.SHGetNewLinkInfoW +358 forward @ shell32.SHDefExtractIconW 359 forward @ kernel32.OpenEventW 360 forward @ kernel32.RemoveDirectoryW 361 forward @ kernel32.GetShortPathNameW @@ -369,7 +369,7 @@ 367 forward @ kernel32.WritePrivateProfileStructW 368 forward @ kernel32.GetPrivateProfileStructW 369 forward @ kernel32.CreateProcessW -370 stdcall @(long wstr long) SHLWAPI_370 +370 forward @ shell32.ExtractIconW 371 stub @ 372 stub @ 373 stub @ @@ -388,9 +388,9 @@ 386 stdcall ChrCmpIW(long long) ChrCmpIW 387 stub ColorAdjustLuma 388 stub @ -389 stdcall @(ptr) SHLWAPI_389 -390 stdcall @(ptr ptr) SHLWAPI_390 -391 stdcall @(ptr ptr ptr ptr ptr ) SHLWAPI_391 +389 forward @ comdlg32.GetSaveFileNameW +390 forward @ mpr.WNetRestoreConnectionW +391 forward @ mpr.WNetGetLastErrorW 392 stub @ 393 stub @ 394 forward @ user32.CreateDialogIndirectParamA @@ -400,9 +400,9 @@ 398 stub @ 399 stub @ 400 stub @ -401 stdcall @(ptr) SHLWAPI_401 -402 stdcall @(ptr) SHLWAPI_402 -403 stdcall @(ptr) SHLWAPI_403 +401 forward @ comdlg32.PageSetupDlgW +402 forward @ comdlg32.PrintDlgW +403 forward @ comdlg32.GetOpenFileNameW 404 stdcall ColorHLSToRGB(long long long) ColorHLSToRGB 405 stub @ 406 stub @ @@ -421,9 +421,9 @@ 419 stub @ 420 stub @ 421 stub @ -422 stdcall @(str long) SHLWAPI_422 -423 stdcall @(wstr long) SHLWAPI_423 -424 stdcall @(long) SHLWAPI_424 +422 stdcall @(str long) _SHGlobalCounterCreateNamedA +423 stdcall @(wstr long) _SHGlobalCounterCreateNamedW +424 stdcall @(long) _SHGlobalCounterDecrement 425 stub @ 426 stub @ 427 stub @ @@ -700,7 +700,6 @@ @ stdcall PathIsLFNFileSpecW(wstr) PathIsLFNFileSpecW @ stdcall PathFindSuffixArrayA(str ptr long) PathFindSuffixArrayA @ stdcall PathFindSuffixArrayW(wstr ptr long) PathFindSuffixArrayW -@ stdcall _SHGetInstanceExplorer@4(ptr) _SHGetInstanceExplorer @ stdcall PathUndecorateA(str) PathUndecorateA @ stdcall PathUndecorateW(wstr) PathUndecorateW @ stub PathUnExpandEnvStringsA @@ -725,3 +724,8 @@ @ stub StrFormatByteSize64A @ stub StrFormatKBSizeA @ stub StrFormatKBSizeW + + + + + Index: wine/dlls/shlwapi/thread.c =================================================================== RCS file: /home/wine/wine/dlls/shlwapi/thread.c,v retrieving revision 1.1 diff -d -u -r1.1 thread.c --- wine/dlls/shlwapi/thread.c 22 Jul 2002 20:32:53 -0000 1.1 +++ wine/dlls/shlwapi/thread.c 24 Jul 2002 19:22:11 -0000 @@ -36,12 +36,10 @@ extern DWORD SHLWAPI_ThreadRef_index; /* Initialised in shlwapi_main.c */ -static HRESULT (WINAPI *pSHGetInstanceExplorer)(IUnknown**); - DWORD WINAPI SHLWAPI_23(REFGUID,LPSTR,INT); /************************************************************************** - * @ [SHLWAPI.356] + * _CreateAllAccessSecurityAttributes [SHLWAPI.356] * * Initialise security attributes from a security descriptor. * @@ -52,60 +50,28 @@ * RETURNS * Success: lpAttr, initialised using lpSec. * Failure: NULL, if any parameters are invalid. - * - * NOTES - * This function always returns returns NULL if the underlying OS version - * Wine is impersonating does not use security descriptors (i.e. anything - * before Windows NT). */ LPSECURITY_ATTRIBUTES -WINAPI SHLWAPI_356(LPSECURITY_ATTRIBUTES lpAttr, PSECURITY_DESCRIPTOR lpSec) +WINAPI _CreateAllAccessSecurityAttributes (LPSECURITY_ATTRIBUTES lpAttr, PSECURITY_DESCRIPTOR lpSec) { - /* This function is used within SHLWAPI only to create security attributes - * for shell semaphores. */ - TRACE("(%p,%p)\n", lpAttr, lpSec); - if (0) /* FIXME: SHWAPI_OsIsUnicode, as per shell32 */ - { - if (!lpSec || !lpAttr) + if (!lpSec || !lpAttr) return NULL; - if (InitializeSecurityDescriptor(lpSec, 1)) + if (InitializeSecurityDescriptor(lpSec, 1)) + { + if (SetSecurityDescriptorDacl(lpSec, TRUE, NULL, FALSE)) { - if (SetSecurityDescriptorDacl(lpSec, TRUE, NULL, FALSE)) - { - lpAttr->nLength = sizeof(SECURITY_ATTRIBUTES); - lpAttr->lpSecurityDescriptor = lpSec; - lpAttr->bInheritHandle = FALSE; - return lpAttr; - } + lpAttr->nLength = sizeof(SECURITY_ATTRIBUTES); + lpAttr->lpSecurityDescriptor = lpSec; + lpAttr->bInheritHandle = FALSE; + return lpAttr; } } return NULL; } -/************************************************************************* - * _SHGetInstanceExplorer [SHLWAPI.@] - * - * Get an interface to the shell explorer. - * - * PARAMS - * lpUnknown [O] pointer to recieve interface. - * - * RETURNS - * Success: S_OK. lppUnknown contains the explorer interface. - * Failure: An HRESULT error code. - */ -HRESULT WINAPI _SHGetInstanceExplorer(IUnknown **lppUnknown) -{ - /* This function is used within SHLWAPI only to hold the IE reference - * for threads created with the CTF_PROCESS_REF flag set. */ - - GET_FUNC(pSHGetInstanceExplorer, shell32, "SHGetInstanceExplorer", E_FAIL); - return pSHGetInstanceExplorer(lppUnknown); -} - /* Internal thread information structure */ typedef struct tagSHLWAPI_THREAD_INFO { @@ -281,7 +247,7 @@ ti.refThread = NULL; if(dwFlags & CTF_PROCESS_REF) - _SHGetInstanceExplorer(&ti.refIE); + SHGetInstanceExplorer(&ti.refIE); else ti.refIE = NULL; @@ -325,7 +291,7 @@ } /************************************************************************* - * @ [SHLWAPI.223] + * _SHGlobalCounterGetValue [SHLWAPI.223] * * Get the current count of a semaphore. * @@ -335,7 +301,7 @@ * RETURNS * The current count of the semaphore. */ -DWORD WINAPI SHLWAPI_223(HANDLE hSem) +DWORD WINAPI _SHGlobalCounterGetValue(HANDLE hSem) { DWORD dwOldCount = 0; @@ -346,7 +312,7 @@ } /************************************************************************* - * @ [SHLWAPI.224] + * _SHGlobalCounterIncrement [SHLWAPI.224] * * Claim a semaphore. * @@ -356,7 +322,7 @@ * RETURNS * The new count of the semaphore. */ -DWORD WINAPI SHLWAPI_224(HANDLE hSem) +DWORD WINAPI _SHGlobalCounterIncrement(HANDLE hSem) { DWORD dwOldCount = 0; @@ -366,7 +332,7 @@ } /************************************************************************* - * @ [SHLWAPI.424] + * _SHGlobalCounterDecrement [SHLWAPI.424] * * Release a semaphore. * @@ -376,23 +342,22 @@ * RETURNS * The new count of the semaphore. */ -DWORD WINAPI SHLWAPI_424(HANDLE hSem) +DWORD WINAPI _SHGlobalCounterDecrement(HANDLE hSem) { DWORD dwOldCount = 0; TRACE("(0x%08x)\n", hSem); - dwOldCount = SHLWAPI_223(hSem); + dwOldCount = _SHGlobalCounterGetValue(hSem); WaitForSingleObject(hSem, 0); return dwOldCount - 1; } /************************************************************************* - * @ [SHLWAPI.423] + * _SHGlobalCounterCreateNamedW [SHLWAPI.423] * - * Unicode version of SHLWAPI_422. */ -HANDLE WINAPI SHLWAPI_423(LPCWSTR lpszName, DWORD iInitial) +HANDLE WINAPI _SHGlobalCounterCreateNamedW(LPCWSTR lpszName, DWORD iInitial) { static const WCHAR szPrefix[] = { 's', 'h', 'e', 'l', 'l', '.', '\0' }; const int iPrefixLen = 6; @@ -410,7 +375,7 @@ StrCpyNW(szBuff + iPrefixLen, lpszName, iBuffLen - iPrefixLen); /* Initialise security attributes */ - pSecAttr = SHLWAPI_356(&sAttr, &sd); + pSecAttr = _CreateAllAccessSecurityAttributes(&sAttr, &sd); if (!(hRet = CreateSemaphoreW(pSecAttr , iInitial, MAXLONG, szBuff))) hRet = OpenSemaphoreW(SYNCHRONIZE|SEMAPHORE_MODIFY_STATE, 0, szBuff); @@ -418,7 +383,7 @@ } /************************************************************************* - * @ [SHLWAPI.422] + * _SHGlobalCounterCreateNamedA [SHLWAPI.422] * * Create a semaphore. * @@ -429,7 +394,7 @@ * RETURNS * A new semaphore handle. */ -HANDLE WINAPI SHLWAPI_422(LPCSTR lpszName, DWORD iInitial) +HANDLE WINAPI _SHGlobalCounterCreateNamedA(LPCSTR lpszName, DWORD iInitial) { WCHAR szBuff[MAX_PATH]; @@ -437,11 +402,11 @@ if (lpszName) MultiByteToWideChar(0, 0, lpszName, -1, szBuff, MAX_PATH); - return SHLWAPI_423(lpszName ? szBuff : NULL, iInitial); + return _SHGlobalCounterCreateNamedW(lpszName ? szBuff : NULL, iInitial); } /************************************************************************* - * @ [SHLWAPI.222] + * _SHGlobalCounterCreate [SHLWAPI.222] * * Create a semaphore using the name of a GUID. * @@ -454,7 +419,7 @@ * NOTES * The initial count of the semaphore is set to 0. */ -HANDLE WINAPI SHLWAPI_222(REFGUID guid) +HANDLE WINAPI _SHGlobalCounterCreate(REFGUID guid) { char szName[40]; @@ -462,5 +427,5 @@ /* Create a named semaphore using the GUID string */ SHLWAPI_23(guid, szName, sizeof(szName) - 1); - return SHLWAPI_422(szName, 0); + return _SHGlobalCounterCreateNamedA(szName, 0); } Index: wine/include/shlobj.h =================================================================== RCS file: /home/wine/wine/include/shlobj.h,v retrieving revision 1.51 diff -d -u -r1.51 shlobj.h --- wine/include/shlobj.h 31 May 2002 23:06:48 -0000 1.51 +++ wine/include/shlobj.h 24 Jul 2002 19:22:19 -0000 @@ -543,6 +543,10 @@ BOOL fWide; } DROPFILES; + +HRESULT WINAPI SHGetInstanceExplorer(IUnknown **ppunk); + + #ifdef __cplusplus } /* extern "C" */ #endif /* defined(__cplusplus) */ Index: wine/include/wine/obj_misc.h =================================================================== RCS file: /home/wine/wine/include/wine/obj_misc.h,v retrieving revision 1.13 diff -d -u -r1.13 obj_misc.h --- wine/include/wine/obj_misc.h 31 May 2002 23:06:50 -0000 1.13 +++ wine/include/wine/obj_misc.h 24 Jul 2002 19:22:35 -0000 @@ -103,7 +103,7 @@ #define ICOM_INTERFACE IMallocSpy #define IMallocSpy_METHODS \ ICOM_METHOD1 (ULONG,PreAlloc, ULONG,cbRequest) \ - ICOM_VMETHOD1( PostAlloc, void*,pActual) \ + ICOM_METHOD1 (PVOID,PostAlloc, void*,pActual) \ ICOM_METHOD2 (PVOID,PreFree, void*,pRequest, BOOL,fSpyed) \ ICOM_VMETHOD1( PostFree, BOOL,fSpyed) \ ICOM_METHOD4 (ULONG,PreRealloc, void*,pRequest, ULONG,cbRequest, void**,ppNewRequest, BOOL,fSpyed) \