Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shlwapi/shlwapi.spec | 2 +- dlls/shlwapi/string.c | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-)
diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index 4c31724b48..c96fcf0be4 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -343,7 +343,7 @@ 343 stdcall -noname SHRegGetCLSIDKeyA(ptr str long long ptr) 344 stdcall -noname SHRegGetCLSIDKeyW(ptr wstr long long ptr) 345 stdcall -ordinal SHAnsiToAnsi(str ptr long) -346 stdcall -ordinal SHUnicodeToUnicode(wstr ptr long) +346 stdcall -ordinal SHUnicodeToUnicode(wstr ptr long) shcore.SHUnicodeToUnicode 347 stdcall -noname RegDeleteValueWrapW(long wstr) advapi32.RegDeleteValueW 348 stub -noname SHGetFileDescriptionW 349 stub -noname SHGetFileDescriptionA diff --git a/dlls/shlwapi/string.c b/dlls/shlwapi/string.c index b190ffc9e4..baa9c29a0f 100644 --- a/dlls/shlwapi/string.c +++ b/dlls/shlwapi/string.c @@ -2773,21 +2773,6 @@ DWORD WINAPI SHAnsiToAnsi(LPCSTR lpszSrc, LPSTR lpszDst, int iLen) return lpszRet - lpszDst + 1; }
-/************************************************************************* - * @ [SHLWAPI.346] - * - * Unicode version of SSHAnsiToAnsi. - */ -DWORD WINAPI SHUnicodeToUnicode(LPCWSTR lpszSrc, LPWSTR lpszDst, int iLen) -{ - LPWSTR lpszRet; - - TRACE("(%s,%p,0x%08x)\n", debugstr_w(lpszSrc), lpszDst, iLen); - - lpszRet = StrCpyNXW(lpszDst, lpszSrc, iLen); - return lpszRet - lpszDst + 1; -} - /************************************************************************* * @ [SHLWAPI.364] *
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shlwapi/shlwapi.spec | 2 +- dlls/shlwapi/string.c | 24 ------------------------ 2 files changed, 1 insertion(+), 25 deletions(-)
diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index c96fcf0be4..c104d82923 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -342,7 +342,7 @@ 342 stdcall -noname SHInterlockedCompareExchange(ptr ptr ptr) 343 stdcall -noname SHRegGetCLSIDKeyA(ptr str long long ptr) 344 stdcall -noname SHRegGetCLSIDKeyW(ptr wstr long long ptr) -345 stdcall -ordinal SHAnsiToAnsi(str ptr long) +345 stdcall -ordinal SHAnsiToAnsi(str ptr long) shcore.SHAnsiToAnsi 346 stdcall -ordinal SHUnicodeToUnicode(wstr ptr long) shcore.SHUnicodeToUnicode 347 stdcall -noname RegDeleteValueWrapW(long wstr) advapi32.RegDeleteValueW 348 stub -noname SHGetFileDescriptionW diff --git a/dlls/shlwapi/string.c b/dlls/shlwapi/string.c index baa9c29a0f..d400f8befe 100644 --- a/dlls/shlwapi/string.c +++ b/dlls/shlwapi/string.c @@ -2749,30 +2749,6 @@ INT WINAPI SHUnicodeToAnsi(LPCWSTR lpSrcStr, LPSTR lpDstStr, INT iLen) return SHUnicodeToAnsiCP(CP_ACP, lpSrcStr, lpDstStr, iLen); }
-/************************************************************************* - * @ [SHLWAPI.345] - * - * Copy one string to another. - * - * PARAMS - * lpszSrc [I] Source string to copy - * lpszDst [O] Destination for copy - * iLen [I] Length of lpszDst in characters - * - * RETURNS - * The length of the copied string, including the terminating NUL. lpszDst - * contains iLen characters of lpszSrc. - */ -DWORD WINAPI SHAnsiToAnsi(LPCSTR lpszSrc, LPSTR lpszDst, int iLen) -{ - LPSTR lpszRet; - - TRACE("(%s,%p,0x%08x)\n", debugstr_a(lpszSrc), lpszDst, iLen); - - lpszRet = StrCpyNXA(lpszDst, lpszSrc, iLen); - return lpszRet - lpszDst + 1; -} - /************************************************************************* * @ [SHLWAPI.364] *
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shlwapi/reg.c | 133 -------------------------------------- dlls/shlwapi/shlwapi.spec | 4 +- 2 files changed, 2 insertions(+), 135 deletions(-)
diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c index fa091abd85..2ff797793f 100644 --- a/dlls/shlwapi/reg.c +++ b/dlls/shlwapi/reg.c @@ -1994,139 +1994,6 @@ HKEY WINAPI SHRegDuplicateHKey(HKEY hKey) return newKey; }
- -/************************************************************************* - * SHCopyKeyA [SHLWAPI.@] - * - * Copy a key and its values/sub keys to another location. - * - * PARAMS - * hKeySrc [I] Source key to copy from - * lpszSrcSubKey [I] Sub key under hKeySrc, or NULL to use hKeySrc directly - * hKeyDst [I] Destination key - * dwReserved [I] Reserved, must be 0 - * - * RETURNS - * Success: ERROR_SUCCESS. The key is copied to the destination key. - * Failure: A standard windows error code. - * - * NOTES - * If hKeyDst is a key under hKeySrc, this function will misbehave - * (It will loop until out of stack, or the registry is full). This - * bug is present in Win32 also. - */ -DWORD WINAPI SHCopyKeyA(HKEY hKeySrc, LPCSTR lpszSrcSubKey, HKEY hKeyDst, DWORD dwReserved) -{ - WCHAR szSubKeyW[MAX_PATH]; - - TRACE("(hkey=%p,%s,%p08x,%d)\n", hKeySrc, debugstr_a(lpszSrcSubKey), hKeyDst, dwReserved); - - if (lpszSrcSubKey) - MultiByteToWideChar(CP_ACP, 0, lpszSrcSubKey, -1, szSubKeyW, MAX_PATH); - - return SHCopyKeyW(hKeySrc, lpszSrcSubKey ? szSubKeyW : NULL, hKeyDst, dwReserved); -} - -/************************************************************************* - * SHCopyKeyW [SHLWAPI.@] - * - * See SHCopyKeyA. - */ -DWORD WINAPI SHCopyKeyW(HKEY hKeySrc, LPCWSTR lpszSrcSubKey, HKEY hKeyDst, DWORD dwReserved) -{ - DWORD dwKeyCount = 0, dwValueCount = 0, dwMaxKeyLen = 0; - DWORD dwMaxValueLen = 0, dwMaxDataLen = 0, i; - BYTE buff[1024]; - LPVOID lpBuff = buff; - WCHAR szName[MAX_PATH], *lpszName = szName; - DWORD dwRet = S_OK; - - TRACE("hkey=%p,%s,%p08x,%d)\n", hKeySrc, debugstr_w(lpszSrcSubKey), hKeyDst, dwReserved); - - if(!hKeyDst || !hKeySrc) - dwRet = ERROR_INVALID_PARAMETER; - else - { - /* Open source key */ - if(lpszSrcSubKey) - dwRet = RegOpenKeyExW(hKeySrc, lpszSrcSubKey, 0, KEY_ALL_ACCESS, &hKeySrc); - - if(dwRet) - hKeyDst = NULL; /* Don't close this key since we didn't open it */ - else - { - /* Get details about sub keys and values */ - dwRet = RegQueryInfoKeyW(hKeySrc, NULL, NULL, NULL, &dwKeyCount, &dwMaxKeyLen, - NULL, &dwValueCount, &dwMaxValueLen, &dwMaxDataLen, - NULL, NULL); - if(!dwRet) - { - if (dwMaxValueLen > dwMaxKeyLen) - dwMaxKeyLen = dwMaxValueLen; /* Get max size for key/value names */ - - if (dwMaxKeyLen++ > MAX_PATH - 1) - lpszName = HeapAlloc(GetProcessHeap(), 0, dwMaxKeyLen * sizeof(WCHAR)); - - if (dwMaxDataLen > sizeof(buff)) - lpBuff = HeapAlloc(GetProcessHeap(), 0, dwMaxDataLen); - - if (!lpszName || !lpBuff) - dwRet = ERROR_NOT_ENOUGH_MEMORY; - } - } - } - - /* Copy all the sub keys */ - for(i = 0; i < dwKeyCount && !dwRet; i++) - { - HKEY hSubKeySrc, hSubKeyDst; - DWORD dwSize = dwMaxKeyLen; - - dwRet = RegEnumKeyExW(hKeySrc, i, lpszName, &dwSize, NULL, NULL, NULL, NULL); - - if(!dwRet) - { - /* Open source sub key */ - dwRet = RegOpenKeyExW(hKeySrc, lpszName, 0, KEY_READ, &hSubKeySrc); - - if(!dwRet) - { - /* Create destination sub key */ - dwRet = RegCreateKeyW(hKeyDst, lpszName, &hSubKeyDst); - - if(!dwRet) - { - /* Recursively copy keys and values from the sub key */ - dwRet = SHCopyKeyW(hSubKeySrc, NULL, hSubKeyDst, 0); - RegCloseKey(hSubKeyDst); - } - } - RegCloseKey(hSubKeySrc); - } - } - - /* Copy all the values in this key */ - for (i = 0; i < dwValueCount && !dwRet; i++) - { - DWORD dwNameSize = dwMaxKeyLen, dwType, dwLen = dwMaxDataLen; - - dwRet = RegEnumValueW(hKeySrc, i, lpszName, &dwNameSize, NULL, &dwType, lpBuff, &dwLen); - - if (!dwRet) - dwRet = SHSetValueW(hKeyDst, NULL, lpszName, dwType, lpBuff, dwLen); - } - - /* Free buffers if allocated */ - if (lpszName != szName) - HeapFree(GetProcessHeap(), 0, lpszName); - if (lpBuff != buff) - HeapFree(GetProcessHeap(), 0, lpBuff); - - if (lpszSrcSubKey && hKeyDst) - RegCloseKey(hKeyDst); - return dwRet; -} - /* * The following functions are ORDINAL ONLY: */ diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index c104d82923..55655a627c 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -680,8 +680,8 @@ @ stdcall PathUnquoteSpacesA (str) @ stdcall PathUnquoteSpacesW (wstr) @ stdcall SHAutoComplete(ptr long) -@ stdcall SHCopyKeyA(long str long long) -@ stdcall SHCopyKeyW(long wstr long long) +@ stdcall SHCopyKeyA(long str long long) shcore.SHCopyKeyA +@ stdcall SHCopyKeyW(long wstr long long) shcore.SHCopyKeyW @ stdcall SHCreateShellPalette(long) @ stdcall SHCreateStreamOnFileA(str long ptr) shcore.SHCreateStreamOnFileA @ stdcall SHCreateStreamOnFileEx(wstr long long long ptr ptr) shcore.SHCreateStreamOnFileEx
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shlwapi/ordinal.c | 131 -------------------------------------- dlls/shlwapi/shlwapi.spec | 2 +- 2 files changed, 1 insertion(+), 132 deletions(-)
diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index 810b5746b4..4118d4b308 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -3805,137 +3805,6 @@ HRESULT WINAPI CLSIDFromStringWrap(LPCWSTR idstr, CLSID *id) return CLSIDFromString((LPCOLESTR)idstr, id); }
-/************************************************************************* - * @ [SHLWAPI.437] - * - * Determine if the OS supports a given feature. - * - * PARAMS - * dwFeature [I] Feature requested (undocumented) - * - * RETURNS - * TRUE If the feature is available. - * FALSE If the feature is not available. - */ -BOOL WINAPI IsOS(DWORD feature) -{ - OSVERSIONINFOA osvi; - DWORD platform, majorv, minorv; - - osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA); - if(!GetVersionExA(&osvi)) { - ERR("GetVersionEx failed\n"); - return FALSE; - } - - majorv = osvi.dwMajorVersion; - minorv = osvi.dwMinorVersion; - platform = osvi.dwPlatformId; - -#define ISOS_RETURN(x) \ - TRACE("(0x%x) ret=%d\n",feature,(x)); \ - return (x); - - switch(feature) { - case OS_WIN32SORGREATER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32s - || platform == VER_PLATFORM_WIN32_WINDOWS) - case OS_NT: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT) - case OS_WIN95ORGREATER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS) - case OS_NT4ORGREATER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 4) - case OS_WIN2000ORGREATER_ALT: - case OS_WIN2000ORGREATER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5) - case OS_WIN98ORGREATER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv >= 10) - case OS_WIN98_GOLD: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv == 10) - case OS_WIN2000PRO: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5) - case OS_WIN2000SERVER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1)) - case OS_WIN2000ADVSERVER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1)) - case OS_WIN2000DATACENTER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1)) - case OS_WIN2000TERMINAL: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1)) - case OS_EMBEDDED: - FIXME("(OS_EMBEDDED) What should we return here?\n"); - return FALSE; - case OS_TERMINALCLIENT: - FIXME("(OS_TERMINALCLIENT) What should we return here?\n"); - return FALSE; - case OS_TERMINALREMOTEADMIN: - FIXME("(OS_TERMINALREMOTEADMIN) What should we return here?\n"); - return FALSE; - case OS_WIN95_GOLD: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv == 0) - case OS_MEORGREATER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv >= 90) - case OS_XPORGREATER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5 && minorv >= 1) - case OS_HOME: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5 && minorv >= 1) - case OS_PROFESSIONAL: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT) - case OS_DATACENTER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT) - case OS_ADVSERVER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5) - case OS_SERVER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT) - case OS_TERMINALSERVER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT) - case OS_PERSONALTERMINALSERVER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && minorv >= 1 && majorv >= 5) - case OS_FASTUSERSWITCHING: - FIXME("(OS_FASTUSERSWITCHING) What should we return here?\n"); - return TRUE; - case OS_WELCOMELOGONUI: - FIXME("(OS_WELCOMELOGONUI) What should we return here?\n"); - return FALSE; - case OS_DOMAINMEMBER: - FIXME("(OS_DOMAINMEMBER) What should we return here?\n"); - return TRUE; - case OS_ANYSERVER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT) - case OS_WOW6432: - { - BOOL is_wow64; - IsWow64Process(GetCurrentProcess(), &is_wow64); - return is_wow64; - } - case OS_WEBSERVER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT) - case OS_SMALLBUSINESSSERVER: - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT) - case OS_TABLETPC: - FIXME("(OS_TABLETPC) What should we return here?\n"); - return FALSE; - case OS_SERVERADMINUI: - FIXME("(OS_SERVERADMINUI) What should we return here?\n"); - return FALSE; - case OS_MEDIACENTER: - FIXME("(OS_MEDIACENTER) What should we return here?\n"); - return FALSE; - case OS_APPLIANCE: - FIXME("(OS_APPLIANCE) What should we return here?\n"); - return FALSE; - case 0x25: /*OS_VISTAORGREATER*/ - ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 6) - } - -#undef ISOS_RETURN - - WARN("(0x%x) unknown parameter\n",feature); - - return FALSE; -} - /************************************************************************* * @ [SHLWAPI.439] */ diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index 55655a627c..060daccf24 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -434,7 +434,7 @@ 434 stdcall -noname SendMessageTimeoutWrapW(long long long long long long ptr) user32.SendMessageTimeoutW 435 stdcall -noname CLSIDFromProgIDWrap(wstr ptr) ole32.CLSIDFromProgID 436 stdcall -noname CLSIDFromStringWrap(wstr ptr) -437 stdcall -ordinal IsOS(long) +437 stdcall -ordinal IsOS(long) shcore.IsOS 438 stub -noname SHLoadRegUIStringA 439 stdcall -noname SHLoadRegUIStringW(ptr wstr ptr long) 440 stdcall -noname SHGetWebFolderFilePathA(str ptr long)