Use Unicode functions inside check_swap

This ensures that always Unicode functions are used in check_swap.
This commit is contained in:
Michael Insel 2019-04-04 19:55:07 +02:00 committed by Markus Frosch
parent 61ea5ea758
commit 20fc8960e1
1 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ struct pageFileInfo
static bool l_Debug; static bool l_Debug;
BOOL EnumPageFilesProc(LPVOID pContext, PENUM_PAGE_FILE_INFORMATION pPageFileInfo, LPCTSTR lpFilename) { BOOL EnumPageFilesProc(LPVOID pContext, PENUM_PAGE_FILE_INFORMATION pPageFileInfo, LPCWSTR lpFilename) {
std::vector<pageFileInfo>* pageFile = static_cast<std::vector<pageFileInfo>*>(pContext); std::vector<pageFileInfo>* pageFile = static_cast<std::vector<pageFileInfo>*>(pContext);
SYSTEM_INFO systemInfo; SYSTEM_INFO systemInfo;
@ -199,10 +199,10 @@ static int printOutput(printInfoStruct& printInfo)
static int check_swap(printInfoStruct& printInfo) static int check_swap(printInfoStruct& printInfo)
{ {
PENUM_PAGE_FILE_CALLBACK pageFileCallback = &EnumPageFilesProc; PENUM_PAGE_FILE_CALLBACKW pageFileCallback = &EnumPageFilesProc;
std::vector<pageFileInfo> pageFiles; std::vector<pageFileInfo> pageFiles;
if(!EnumPageFiles(pageFileCallback, &pageFiles)) { if(!EnumPageFilesW(pageFileCallback, &pageFiles)) {
printErrorInfo(); printErrorInfo();
return 3; return 3;
} }