Bug 1684110 - Stop using some 'A'-functions in netwerk/. r=necko-reviewers,kershaw

Depends on D100466

Differential Revision: https://phabricator.services.mozilla.com/D100467
This commit is contained in:
Masatoshi Kimura 2021-01-04 20:34:50 +00:00
parent b1477d11d2
commit 22723674f7
5 changed files with 11 additions and 11 deletions

View File

@ -114,7 +114,7 @@ class BlockingIOWatcher {
#ifdef XP_WIN
BlockingIOWatcher::BlockingIOWatcher() : mThread(NULL), mEvent(NULL) {
HMODULE kernel32_dll = GetModuleHandle("kernel32.dll");
HMODULE kernel32_dll = GetModuleHandleW(L"kernel32.dll");
if (!kernel32_dll) {
return;
}

View File

@ -272,13 +272,13 @@ nsresult GetAddrInfoInit() {
#ifdef DNSQUERY_AVAILABLE
DWORD namesize = COMPUTER_NAME_BUFFER_SIZE;
if (!GetComputerNameEx(ComputerNameDnsHostname, sDNSComputerName,
&namesize)) {
if (!GetComputerNameExA(ComputerNameDnsHostname, sDNSComputerName,
&namesize)) {
sDNSComputerName[0] = 0;
}
namesize = MAX_COMPUTERNAME_LENGTH + 1;
if (!GetComputerNameEx(ComputerNameNetBIOS, sNETBIOSComputerName,
&namesize)) {
if (!GetComputerNameExA(ComputerNameNetBIOS, sNETBIOSComputerName,
&namesize)) {
sNETBIOSComputerName[0] = 0;
}
#endif

View File

@ -325,7 +325,7 @@ nsresult nsNotifyAddrListener::Init(void) {
observerService->AddObserver(this, "xpcom-shutdown-threads", false);
NS_ENSURE_SUCCESS(rv, rv);
mCheckEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr);
mCheckEvent = CreateEventW(nullptr, FALSE, FALSE, nullptr);
NS_ENSURE_TRUE(mCheckEvent, NS_ERROR_OUT_OF_MEMORY);
nsCOMPtr<nsIThreadPool> threadPool = new nsThreadPool();

View File

@ -15,10 +15,10 @@ class InterfaceScanCallbackData {
explicit InterfaceScanCallbackData(uint32_t numInterfaces)
: mCurrentlyScanningInterfaces(numInterfaces) {
mAllInterfacesDoneScanningEvent =
::CreateEvent(nullptr, // null security
TRUE, // manual reset event
FALSE, // initially nonsignaled
nullptr); // not named
::CreateEventW(nullptr, // null security
TRUE, // manual reset event
FALSE, // initially nonsignaled
nullptr); // not named
MOZ_ASSERT(NULL != mAllInterfacesDoneScanningEvent);
}

View File

@ -66,7 +66,7 @@ decltype(::WlanScan)* WinWLANLibrary::GetWlanScanPtr() const {
}
bool WinWLANLibrary::Initialize() {
mWlanLibrary = LoadLibrary("Wlanapi.dll");
mWlanLibrary = LoadLibraryW(L"Wlanapi.dll");
if (!mWlanLibrary) {
return false;
}