diff --git a/goo/gfile.cc b/goo/gfile.cc index 3528bb3..7450bfd 100644 --- a/goo/gfile.cc +++ b/goo/gfile.cc @@ -72,7 +72,7 @@ GooString *getCurrentDir() { #if defined(__EMX__) if (_getcwd2(buf, sizeof(buf))) #elif defined(_WIN32) - if (GetCurrentDirectory(sizeof(buf), buf)) + if (GetCurrentDirectoryA(sizeof(buf), buf)) #elif defined(ACORN) if (strcpy(buf, "@")) #elif defined(MACOS) @@ -620,7 +620,7 @@ Goffset GooFile::size() const { } GooFile* GooFile::open(const GooString *fileName) { - HANDLE handle = CreateFile(fileName->getCString(), + HANDLE handle = CreateFileA(fileName->getCString(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc index e543408..95ed21e 100644 --- a/poppler/GlobalParams.cc +++ b/poppler/GlobalParams.cc @@ -178,7 +178,7 @@ get_poppler_datadir (void) if (beenhere) return retval; - if (!GetModuleFileName (hmodule, (CHAR *) retval, sizeof(retval) - 20)) + if (!GetModuleFileNameA (hmodule, (CHAR *) retval, sizeof(retval) - 20)) return POPPLER_DATADIR; p = _mbsrchr ((unsigned char *) retval, '\\'); diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc index f9f40ef..58f1f77 100644 --- a/poppler/GlobalParamsWin.cc +++ b/poppler/GlobalParamsWin.cc @@ -193,7 +193,7 @@ static void GetWindowsFontDir(char *winFontDir, int cbWinFontDirLen) // WinNT4), so do a dynamic load of ANSI versions. winFontDir[0] = '\0'; - HMODULE hLib = LoadLibrary("shell32.dll"); + HMODULE hLib = LoadLibraryA("shell32.dll"); if (hLib) { SHGetFolderPathFunc = (HRESULT (__stdcall *)(HWND, int, HANDLE, DWORD, LPTSTR)) GetProcAddress(hLib, "SHGetFolderPathA"); @@ -213,7 +213,7 @@ static void GetWindowsFontDir(char *winFontDir, int cbWinFontDirLen) return; // Try older DLL - hLib = LoadLibrary("SHFolder.dll"); + hLib = LoadLibraryA("SHFolder.dll"); if (hLib) { SHGetFolderPathFunc = (HRESULT (__stdcall *)(HWND, int, HANDLE, DWORD, LPTSTR)) GetProcAddress(hLib, "SHGetFolderPathA"); @@ -225,7 +225,7 @@ static void GetWindowsFontDir(char *winFontDir, int cbWinFontDirLen) return; // Everything else failed so the standard fonts directory. - GetWindowsDirectory(winFontDir, cbWinFontDirLen); + GetWindowsDirectoryA(winFontDir, cbWinFontDirLen); if (winFontDir[0]) { strncat(winFontDir, FONTS_SUBDIR, cbWinFontDirLen); winFontDir[cbWinFontDirLen-1] = 0; @@ -259,14 +259,14 @@ void SysFontList::scanWindowsFonts(GooString *winFontDir) { } else { path = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Fonts\\"; } - if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, path, 0, + if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, path, 0, KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS, ®Key) == ERROR_SUCCESS) { idx = 0; while (1) { valNameLen = sizeof(valName) - 1; dataLen = sizeof(data) - 1; - if (RegEnumValue(regKey, idx, valName, &valNameLen, NULL, + if (RegEnumValueA(regKey, idx, valName, &valNameLen, NULL, &type, (LPBYTE)data, &dataLen) != ERROR_SUCCESS) { break; }