diff --git a/reactos/dll/win32/shlwapi/ordinal.c b/reactos/dll/win32/shlwapi/ordinal.c index c4b45c00214..6aca53d535f 100644 --- a/reactos/dll/win32/shlwapi/ordinal.c +++ b/reactos/dll/win32/shlwapi/ordinal.c @@ -1284,9 +1284,6 @@ BOOL WINAPI SHIsSameObject(IUnknown* lpInt1, IUnknown* lpInt2) */ HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd) { - /* FIXME: Wine has no header for this object */ - static const GUID IID_IInternetSecurityMgrSite = { 0x79eac9ed, - 0xbaf9, 0x11ce, { 0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b }}; IUnknown *lpOle; HRESULT hRet = E_FAIL; diff --git a/reactos/dll/win32/shlwapi/path.c b/reactos/dll/win32/shlwapi/path.c index b2005c1e787..ae9c9918316 100644 --- a/reactos/dll/win32/shlwapi/path.c +++ b/reactos/dll/win32/shlwapi/path.c @@ -2344,7 +2344,12 @@ BOOL WINAPI PathCanonicalizeA(LPSTR lpszBuf, LPCSTR lpszPath) { WCHAR szPath[MAX_PATH]; WCHAR szBuff[MAX_PATH]; - MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH); + int ret = MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH); + + if (!ret) { + WARN("Failed to convert string to widechar (too long?), LE %d.\n", GetLastError()); + return FALSE; + } bRet = PathCanonicalizeW(szBuff, szPath); WideCharToMultiByte(CP_ACP,0,szBuff,-1,lpszBuf,MAX_PATH,0,0); } diff --git a/reactos/dll/win32/shlwapi/shlwapi.rbuild b/reactos/dll/win32/shlwapi/shlwapi.rbuild index 2fe3a56b0f7..a138b2993d6 100644 --- a/reactos/dll/win32/shlwapi/shlwapi.rbuild +++ b/reactos/dll/win32/shlwapi/shlwapi.rbuild @@ -8,23 +8,6 @@ 0x600 0x600 - wine - user32 - gdi32 - advapi32 - kernel32 - ntdll - oleaut32 - ole32 - comctl32 - comdlg32 - mpr - mlang - urlmon - shell32 - winmm - version - uuid assoc.c clist.c istream.c @@ -41,5 +24,22 @@ wsprintf.c shlwapi.rc shlwapi.spec + wine + user32 + gdi32 + advapi32 + kernel32 + oleaut32 + ole32 + comctl32 + comdlg32 + mpr + mlang + urlmon + shell32 + winmm + version + uuid + ntdll diff --git a/reactos/dll/win32/shlwapi/shlwapi.rc b/reactos/dll/win32/shlwapi/shlwapi.rc index e5cade53f4c..650f241926a 100644 --- a/reactos/dll/win32/shlwapi/shlwapi.rc +++ b/reactos/dll/win32/shlwapi/shlwapi.rc @@ -39,6 +39,7 @@ #include "shlwapi_No.rc" #include "shlwapi_Pl.rc" #include "shlwapi_Pt.rc" +#include "shlwapi_Ro.rc" #include "shlwapi_Ru.rc" #include "shlwapi_Sv.rc" #include "shlwapi_Tr.rc" diff --git a/reactos/dll/win32/shlwapi/shlwapi_Ro.rc b/reactos/dll/win32/shlwapi/shlwapi_Ro.rc new file mode 100644 index 00000000000..9b6278fbf95 --- /dev/null +++ b/reactos/dll/win32/shlwapi/shlwapi_Ro.rc @@ -0,0 +1,46 @@ +/* + * Copyright 2004 Jon Griffiths + * Copyright 2008 Michael Stefaniuc + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL + +#pragma code_page(65001) + +IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Eroare!" +FONT 8, "MS Shell Dlg" +{ + LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 + LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 + CHECKBOX "Nu &afiÈ™a din nou acest mesaj", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON L"&OK" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON L"&Renunță" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON L"&Da" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON L"&Nu" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP +} + +STRINGTABLE DISCARDABLE +{ + IDS_BYTES_FORMAT "%ld octeÈ›i" + IDS_TIME_INTERVAL_HOURS " ore" + IDS_TIME_INTERVAL_MINUTES " min" + IDS_TIME_INTERVAL_SECONDS " sec" +} + +#pragma code_page(default) diff --git a/reactos/dll/win32/shlwapi/shlwapi_Ru.rc b/reactos/dll/win32/shlwapi/shlwapi_Ru.rc index 59a8bee5bc7..87aee4acb8a 100644 --- a/reactos/dll/win32/shlwapi/shlwapi_Ru.rc +++ b/reactos/dll/win32/shlwapi/shlwapi_Ru.rc @@ -1,7 +1,7 @@ /* * Russian resources for shlwapi * - * Copyright 2005 Mikhail Y. Zvyozdochkin + * Copyright 2008 Vitaliy Margolen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT @@ -27,17 +27,17 @@ FONT 8, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 - CHECKBOX "&Áîëüøå íå ïîêàçûâàòü ýòî ñîîáùåíèå", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + CHECKBOX "Áîëüøå íå &ïîêàçûâàòü ýòî ñîîáùåíèå", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP PUSHBUTTON L"&OK" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Îòìåíà" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON L"Î&òìåíèòü" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"&Äà" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"&Íåò" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } STRINGTABLE DISCARDABLE { - IDS_BYTES_FORMAT "%ld bytes" - IDS_TIME_INTERVAL_HOURS " hr" - IDS_TIME_INTERVAL_MINUTES " min" - IDS_TIME_INTERVAL_SECONDS " sec" + IDS_BYTES_FORMAT "%ld áàéò" + IDS_TIME_INTERVAL_HOURS " ÷àñ" + IDS_TIME_INTERVAL_MINUTES " ìèí" + IDS_TIME_INTERVAL_SECONDS " ñåê" } diff --git a/reactos/dll/win32/shlwapi/shlwapi_ros.diff b/reactos/dll/win32/shlwapi/shlwapi_ros.diff index 47846385ccf..a8740e5e59f 100644 --- a/reactos/dll/win32/shlwapi/shlwapi_ros.diff +++ b/reactos/dll/win32/shlwapi/shlwapi_ros.diff @@ -2,67 +2,11 @@ Index: shlwapi.rc =================================================================== --- shlwapi.rc (revision 25691) +++ shlwapi.rc (revision 25692) -@@ -39,5 +39,7 @@ - #include "shlwapi_No.rc" - #include "shlwapi_Pl.rc" - #include "shlwapi_Pt.rc" -+#include "shlwapi_Ru.rc" +@@ -43,3 +43,4 @@ + #include "shlwapi_Ru.rc" #include "shlwapi_Sv.rc" #include "shlwapi_Tr.rc" +#include "shlwapi_Uk.rc" -Index: shlwapi_Ru.rc -=================================================================== ---- shlwapi_Ru.rc (revision 25692) -+++ shlwapi_Ru.rc (working copy) -@@ -0,0 +1,43 @@ -+/* -+ * Russian resources for shlwapi -+ * -+ * Copyright 2005 Mikhail Y. Zvyozdochkin -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -+ -+IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60 -+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -+CAPTION "Îøèáêà!" -+FONT 8, "MS Shell Dlg" -+{ -+ LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 -+ LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 -+ CHECKBOX "&Áîëüøå íå ïîêàçûâàòü ýòî ñîîáùåíèå", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP -+ PUSHBUTTON L"&OK" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP -+ PUSHBUTTON L"&Îòìåíà" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP -+ PUSHBUTTON L"&Äà" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP -+ PUSHBUTTON L"&Íåò" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP -+} -+ -+STRINGTABLE DISCARDABLE -+{ -+ IDS_BYTES_FORMAT "%ld bytes" -+ IDS_TIME_INTERVAL_HOURS " hr" -+ IDS_TIME_INTERVAL_MINUTES " min" -+ IDS_TIME_INTERVAL_SECONDS " sec" -+} - -Property shlwapi_Ru.rc -___________________________________________________________________ -Name: svn:eol-style - + native Index: shlwapi_Uk.rc =================================================================== --- shlwapi_Uk.rc (revision 25692) diff --git a/reactos/dll/win32/shlwapi/url.c b/reactos/dll/win32/shlwapi/url.c index fed9a9f792d..ba7cdb6ee92 100644 --- a/reactos/dll/win32/shlwapi/url.c +++ b/reactos/dll/win32/shlwapi/url.c @@ -752,7 +752,6 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative, break; } while(FALSE); /* a litte trick to allow easy exit from nested if's */ - ret = S_OK; switch (process_case) { @@ -780,9 +779,6 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative, memcpy(preliminary, base.pszProtocol, (base.cchProtocol + 1)*sizeof(WCHAR)); work = preliminary + base.cchProtocol + 1; strcpyW(work, relative.pszSuffix); - if (!(dwFlags & URL_PLUGGABLE_PROTOCOL) && - URL_JustLocation(relative.pszSuffix)) - strcatW(work, single_slash); break; case 4: /* @@ -1584,14 +1580,18 @@ static HRESULT URL_ApplyDefault(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut) { HKEY newkey; DWORD data_len, dwType; - WCHAR reg_path[MAX_PATH]; WCHAR value[MAX_PATH], data[MAX_PATH]; + static const WCHAR prefix_keyW[] = + {'S','o','f','t','w','a','r','e', + '\\','M','i','c','r','o','s','o','f','t', + '\\','W','i','n','d','o','w','s', + '\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n', + '\\','U','R','L', + '\\','D','e','f','a','u','l','t','P','r','e','f','i','x',0}; + /* get and prepend default */ - MultiByteToWideChar(0, 0, - "Software\\Microsoft\\Windows\\CurrentVersion\\URL\\DefaultPrefix", - -1, reg_path, MAX_PATH); - RegOpenKeyExW(HKEY_LOCAL_MACHINE, reg_path, 0, 1, &newkey); + RegOpenKeyExW(HKEY_LOCAL_MACHINE, prefix_keyW, 0, 1, &newkey); data_len = MAX_PATH; value[0] = '@'; value[1] = '\0'; @@ -2013,7 +2013,7 @@ static LONG URL_ParseUrl(LPCWSTR pszUrl, WINE_PARSE_URL *pl) * pszIn [I] Url to parse * pszOut [O] Destination for part of pszIn requested * pcchOut [I] Size of pszOut - * [O] length of pszOut string EXLUDING '\0' if S_OK, otherwise + * [O] length of pszOut string EXCLUDING '\0' if S_OK, otherwise * needed size of pszOut INCLUDING '\0'. * dwPart [I] URL_PART_ enum from "shlwapi.h" * dwFlags [I] URL_ flags from "shlwapi.h" @@ -2155,6 +2155,8 @@ BOOL WINAPI PathIsURLA(LPCSTR lpstrPath) PARSEDURLA base; DWORD res1; + TRACE("%s\n", debugstr_a(lpstrPath)); + if (!lpstrPath || !*lpstrPath) return FALSE; /* get protocol */ @@ -2173,6 +2175,8 @@ BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath) PARSEDURLW base; DWORD res1; + TRACE("%s\n", debugstr_w(lpstrPath)); + if (!lpstrPath || !*lpstrPath) return FALSE; /* get protocol */