зеркало из https://github.com/mozilla/gecko-dev.git
Bug 422791 - Reduce ambiguous wide/narrow char API calls in uriloader r=bsmedberg
This commit is contained in:
Родитель
8536a45550
Коммит
ec1478a4d3
|
@ -266,7 +266,7 @@ nsMIMEInfoWin::LoadUriInternal(nsIURI * aURL)
|
|||
SFGAOF sfgao;
|
||||
|
||||
// Bug 394974
|
||||
HMODULE hDll = ::LoadLibrary("shell32.dll");
|
||||
HMODULE hDll = ::LoadLibraryW(L"shell32.dll");
|
||||
MySHParseDisplayName pMySHParseDisplayName = NULL;
|
||||
// Version 6.0 and higher
|
||||
if (pMySHParseDisplayName =
|
||||
|
@ -274,19 +274,19 @@ nsMIMEInfoWin::LoadUriInternal(nsIURI * aURL)
|
|||
"SHParseDisplayName")) {
|
||||
if (SUCCEEDED(pMySHParseDisplayName(NS_ConvertUTF8toUTF16(urlSpec).get(),
|
||||
NULL, &pidl, 0, &sfgao))) {
|
||||
static const char cmdVerb[] = "open";
|
||||
SHELLEXECUTEINFO sinfo;
|
||||
static const PRUnichar cmdVerb[] = L"open";
|
||||
SHELLEXECUTEINFOW sinfo;
|
||||
memset(&sinfo, 0, sizeof(SHELLEXECUTEINFO));
|
||||
sinfo.cbSize = sizeof(SHELLEXECUTEINFO);
|
||||
sinfo.fMask = SEE_MASK_FLAG_DDEWAIT |
|
||||
SEE_MASK_FLAG_NO_UI |
|
||||
SEE_MASK_INVOKEIDLIST;
|
||||
sinfo.hwnd = NULL;
|
||||
sinfo.lpVerb = (LPCSTR)&cmdVerb;
|
||||
sinfo.lpVerb = (LPWSTR)&cmdVerb;
|
||||
sinfo.nShow = SW_SHOWNORMAL;
|
||||
sinfo.lpIDList = pidl;
|
||||
|
||||
BOOL result = ShellExecuteEx(&sinfo);
|
||||
BOOL result = ShellExecuteExW(&sinfo);
|
||||
|
||||
CoTaskMemFree(pidl);
|
||||
|
||||
|
@ -295,7 +295,9 @@ nsMIMEInfoWin::LoadUriInternal(nsIURI * aURL)
|
|||
}
|
||||
} else {
|
||||
// Version of shell32.dll < 6.0
|
||||
LONG r = (LONG) ::ShellExecute(NULL, "open", urlSpec.get(), NULL, NULL,
|
||||
LONG r = (LONG) ::ShellExecuteW(NULL, L"open",
|
||||
NS_ConvertUTF8toUTF16(urlSpec).get(),
|
||||
NULL, NULL,
|
||||
SW_SHOWNORMAL);
|
||||
if (r < 32)
|
||||
rv = NS_ERROR_FAILURE;
|
||||
|
|
|
@ -177,11 +177,11 @@ nsresult nsOSHelperAppService::OSProtocolHandlerExists(const char * aProtocolSch
|
|||
#endif
|
||||
|
||||
HKEY hKey;
|
||||
LONG err = ::RegOpenKeyEx(HKEY_CLASSES_ROOT, aProtocolScheme, 0,
|
||||
LONG err = ::RegOpenKeyExA(HKEY_CLASSES_ROOT, aProtocolScheme, 0,
|
||||
KEY_QUERY_VALUE, &hKey);
|
||||
if (err == ERROR_SUCCESS)
|
||||
{
|
||||
err = ::RegQueryValueEx(hKey, "URL Protocol", NULL, NULL, NULL, NULL);
|
||||
err = ::RegQueryValueExW(hKey, L"URL Protocol", NULL, NULL, NULL, NULL);
|
||||
*aHandlerExists = (err == ERROR_SUCCESS);
|
||||
// close the key
|
||||
::RegCloseKey(hKey);
|
||||
|
|
Загрузка…
Ссылка в новой задаче