mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-29 15:23:02 +05:00
Fully migrate on utf-16 strings where possible
This commit is contained in:
parent
f170201068
commit
6bdd02ffdd
9 changed files with 48 additions and 47 deletions
|
@ -16,7 +16,7 @@
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PlatformToolset>v120_xp</PlatformToolset>
|
<PlatformToolset>v120_xp</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
|
|
@ -34,10 +34,10 @@ char* GetMyDocumentsPath()
|
||||||
|
|
||||||
if ( cUserFilesPath[0] == '\0' )
|
if ( cUserFilesPath[0] == '\0' )
|
||||||
{
|
{
|
||||||
SHGetFolderPath(nullptr, CSIDL_MYDOCUMENTS, nullptr, SHGFP_TYPE_CURRENT, cUserFilesPath);
|
SHGetFolderPathA(nullptr, CSIDL_MYDOCUMENTS, nullptr, SHGFP_TYPE_CURRENT, cUserFilesPath);
|
||||||
PathAppend(cUserFilesPath, *ppUserFilesDir);
|
PathAppendA(cUserFilesPath, *ppUserFilesDir);
|
||||||
|
|
||||||
CreateDirectory(cUserFilesPath, nullptr);
|
CreateDirectoryA(cUserFilesPath, nullptr);
|
||||||
}
|
}
|
||||||
return cUserFilesPath;
|
return cUserFilesPath;
|
||||||
}
|
}
|
||||||
|
|
|
@ -280,9 +280,9 @@ char* GetMyDocumentsPath()
|
||||||
|
|
||||||
if ( cUserFilesPath[0] == '\0' )
|
if ( cUserFilesPath[0] == '\0' )
|
||||||
{
|
{
|
||||||
SHGetFolderPath(nullptr, CSIDL_MYDOCUMENTS, nullptr, SHGFP_TYPE_CURRENT, cUserFilesPath);
|
SHGetFolderPathA(nullptr, CSIDL_MYDOCUMENTS, nullptr, SHGFP_TYPE_CURRENT, cUserFilesPath);
|
||||||
PathAppend(cUserFilesPath, *ppUserFilesDir);
|
PathAppendA(cUserFilesPath, *ppUserFilesDir);
|
||||||
CreateDirectory(cUserFilesPath, nullptr);
|
CreateDirectoryA(cUserFilesPath, nullptr);
|
||||||
}
|
}
|
||||||
return cUserFilesPath;
|
return cUserFilesPath;
|
||||||
}
|
}
|
||||||
|
@ -821,7 +821,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
CTimer::Initialise();
|
CTimer::Initialise();
|
||||||
|
|
||||||
HMODULE hDummyHandle;
|
HMODULE hDummyHandle;
|
||||||
GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCSTR)&DllMain, &hDummyHandle);
|
GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCWSTR)&DllMain, &hDummyHandle);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
|
@ -42,14 +42,14 @@
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PlatformToolset>v141_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PlatformToolset>v141_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
|
|
@ -281,7 +281,6 @@ CLinkListSA<AlphaObjectInfo>& m_alphaList = **AddressByVersion<CLinkListSA<Alpha
|
||||||
|
|
||||||
// Custom variables
|
// Custom variables
|
||||||
static float fSunFarClip;
|
static float fSunFarClip;
|
||||||
static RwTexture* gpMoonMask = nullptr;
|
|
||||||
static HMODULE hDLLModule;
|
static HMODULE hDLLModule;
|
||||||
static struct
|
static struct
|
||||||
{
|
{
|
||||||
|
@ -709,9 +708,11 @@ bool GetCurrentZoneLockedOrUnlocked_Steam(float fPosX, float fPosY)
|
||||||
// By NTAuthority
|
// By NTAuthority
|
||||||
void DrawMoonWithPhases(int moonColor, float* screenPos, float sizeX, float sizeY)
|
void DrawMoonWithPhases(int moonColor, float* screenPos, float sizeX, float sizeY)
|
||||||
{
|
{
|
||||||
|
static RwTexture* gpMoonMask = nullptr;
|
||||||
|
|
||||||
if ( gpMoonMask == nullptr )
|
if ( gpMoonMask == nullptr )
|
||||||
{
|
{
|
||||||
if ( GetFileAttributes("lunar.png") != INVALID_FILE_ATTRIBUTES )
|
if ( GetFileAttributesW(L"lunar.png") != INVALID_FILE_ATTRIBUTES )
|
||||||
{
|
{
|
||||||
// load from file
|
// load from file
|
||||||
gpMoonMask = CPNGFile::ReadFromFile("lunar.png");
|
gpMoonMask = CPNGFile::ReadFromFile("lunar.png");
|
||||||
|
@ -721,9 +722,9 @@ void DrawMoonWithPhases(int moonColor, float* screenPos, float sizeX, float size
|
||||||
// Load from memory
|
// Load from memory
|
||||||
|
|
||||||
HMODULE thisModule;
|
HMODULE thisModule;
|
||||||
GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (LPCSTR)DrawMoonWithPhases, &thisModule);
|
GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (LPCWSTR)DrawMoonWithPhases, &thisModule);
|
||||||
|
|
||||||
HRSRC resource = FindResource(thisModule, MAKEINTRESOURCE(IDR_LUNAR64), RT_RCDATA);
|
HRSRC resource = FindResourceW(thisModule, MAKEINTRESOURCE(IDR_LUNAR64), RT_RCDATA);
|
||||||
void* pMoonMask = static_cast<void*>(LoadResource(thisModule, resource));
|
void* pMoonMask = static_cast<void*>(LoadResource(thisModule, resource));
|
||||||
|
|
||||||
gpMoonMask = CPNGFile::ReadFromMemory(pMoonMask, SizeofResource(thisModule, resource));
|
gpMoonMask = CPNGFile::ReadFromMemory(pMoonMask, SizeofResource(thisModule, resource));
|
||||||
|
@ -816,17 +817,17 @@ char* GetMyDocumentsPath()
|
||||||
|
|
||||||
char cTmpPath[MAX_PATH];
|
char cTmpPath[MAX_PATH];
|
||||||
|
|
||||||
SHGetFolderPath(nullptr, CSIDL_MYDOCUMENTS, nullptr, SHGFP_TYPE_CURRENT, ppTempBufPtr);
|
SHGetFolderPathA(nullptr, CSIDL_MYDOCUMENTS, nullptr, SHGFP_TYPE_CURRENT, ppTempBufPtr);
|
||||||
PathAppend(ppTempBufPtr, *ppUserFilesDir);
|
PathAppendA(ppTempBufPtr, *ppUserFilesDir);
|
||||||
CreateDirectory(ppTempBufPtr, nullptr);
|
CreateDirectoryA(ppTempBufPtr, nullptr);
|
||||||
|
|
||||||
strcpy(cTmpPath, ppTempBufPtr);
|
strcpy_s(cTmpPath, ppTempBufPtr);
|
||||||
PathAppend(cTmpPath, "Gallery");
|
PathAppendA(cTmpPath, "Gallery");
|
||||||
CreateDirectory(cTmpPath, nullptr);
|
CreateDirectoryA(cTmpPath, nullptr);
|
||||||
|
|
||||||
strcpy(cTmpPath, ppTempBufPtr);
|
strcpy_s(cTmpPath, ppTempBufPtr);
|
||||||
PathAppend(cTmpPath, "User Tracks");
|
PathAppendA(cTmpPath, "User Tracks");
|
||||||
CreateDirectory(cTmpPath, nullptr);
|
CreateDirectoryA(cTmpPath, nullptr);
|
||||||
}
|
}
|
||||||
return ppTempBufPtr;
|
return ppTempBufPtr;
|
||||||
}
|
}
|
||||||
|
@ -1134,7 +1135,7 @@ bool ShaderAttach()
|
||||||
if ( InitialiseRenderWare() )
|
if ( InitialiseRenderWare() )
|
||||||
{
|
{
|
||||||
HMODULE thisModule;
|
HMODULE thisModule;
|
||||||
GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (LPCSTR)ShaderAttach, &thisModule);
|
GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (LPCWSTR)ShaderAttach, &thisModule);
|
||||||
|
|
||||||
HRSRC resource = FindResource(thisModule, MAKEINTRESOURCE(IDR_NVCSHADER), RT_RCDATA);
|
HRSRC resource = FindResource(thisModule, MAKEINTRESOURCE(IDR_NVCSHADER), RT_RCDATA);
|
||||||
RwUInt32* shader = static_cast<RwUInt32*>(LoadResource(thisModule, resource));
|
RwUInt32* shader = static_cast<RwUInt32*>(LoadResource(thisModule, resource));
|
||||||
|
@ -2149,9 +2150,9 @@ BOOL InjectDelayedPatches_10()
|
||||||
GetModuleFileNameW(hDLLModule, wcModulePath, _countof(wcModulePath) - 3); // Minus max required space for extension
|
GetModuleFileNameW(hDLLModule, wcModulePath, _countof(wcModulePath) - 3); // Minus max required space for extension
|
||||||
PathRenameExtensionW(wcModulePath, L".ini");
|
PathRenameExtensionW(wcModulePath, L".ini");
|
||||||
|
|
||||||
bool bHasImVehFt = GetModuleHandle("ImVehFt.asi") != nullptr;
|
bool bHasImVehFt = GetModuleHandleW(L"ImVehFt.asi") != nullptr;
|
||||||
bool bSAMP = GetModuleHandle("samp") != nullptr;
|
bool bSAMP = GetModuleHandleW(L"samp") != nullptr;
|
||||||
bool bSARender = GetModuleHandle("SARender.asi") != nullptr;
|
bool bSARender = GetModuleHandleW(L"SARender.asi") != nullptr;
|
||||||
|
|
||||||
ReadRotorFixExceptions(wcModulePath);
|
ReadRotorFixExceptions(wcModulePath);
|
||||||
ReadDoubleRearWheels(wcModulePath);
|
ReadDoubleRearWheels(wcModulePath);
|
||||||
|
@ -2328,7 +2329,7 @@ BOOL InjectDelayedPatches_10()
|
||||||
}
|
}
|
||||||
|
|
||||||
// SSE conflicts
|
// SSE conflicts
|
||||||
if ( GetModuleHandle("shadows.asi") == nullptr )
|
if ( GetModuleHandleW(L"shadows.asi") == nullptr )
|
||||||
{
|
{
|
||||||
Patch<DWORD>(0x70665C, 0x52909090);
|
Patch<DWORD>(0x70665C, 0x52909090);
|
||||||
InjectHook(0x706662, &CShadowCamera::Update);
|
InjectHook(0x706662, &CShadowCamera::Update);
|
||||||
|
@ -2344,7 +2345,7 @@ BOOL InjectDelayedPatches_10()
|
||||||
|
|
||||||
// Adblocker
|
// Adblocker
|
||||||
#if DISABLE_FLA_DONATION_WINDOW
|
#if DISABLE_FLA_DONATION_WINDOW
|
||||||
if ( GetModuleHandle("$fastman92limitAdjuster.asi") != nullptr )
|
if ( GetModuleHandleW(L"$fastman92limitAdjuster.asi") != nullptr )
|
||||||
{
|
{
|
||||||
if ( *(DWORD*)0x748736 != 0xE8186A53 )
|
if ( *(DWORD*)0x748736 != 0xE8186A53 )
|
||||||
{
|
{
|
||||||
|
@ -2372,9 +2373,9 @@ BOOL InjectDelayedPatches_11()
|
||||||
GetModuleFileNameW(hDLLModule, wcModulePath, _countof(wcModulePath) - 3); // Minus max required space for extension
|
GetModuleFileNameW(hDLLModule, wcModulePath, _countof(wcModulePath) - 3); // Minus max required space for extension
|
||||||
PathRenameExtensionW(wcModulePath, L".ini");
|
PathRenameExtensionW(wcModulePath, L".ini");
|
||||||
|
|
||||||
bool bHasImVehFt = GetModuleHandle("ImVehFt.asi") != nullptr;
|
bool bHasImVehFt = GetModuleHandleW(L"ImVehFt.asi") != nullptr;
|
||||||
bool bSAMP = GetModuleHandle("samp") != nullptr;
|
bool bSAMP = GetModuleHandleW(L"samp") != nullptr;
|
||||||
bool bSARender = GetModuleHandle("SARender.asi") != nullptr;
|
bool bSARender = GetModuleHandleW(L"SARender.asi") != nullptr;
|
||||||
|
|
||||||
ReadRotorFixExceptions(wcModulePath);
|
ReadRotorFixExceptions(wcModulePath);
|
||||||
|
|
||||||
|
@ -2559,7 +2560,7 @@ BOOL InjectDelayedPatches_11()
|
||||||
}
|
}
|
||||||
|
|
||||||
// SSE conflicts
|
// SSE conflicts
|
||||||
if ( GetModuleHandle("shadows.asi") == nullptr )
|
if ( GetModuleHandleW(L"shadows.asi") == nullptr )
|
||||||
{
|
{
|
||||||
Patch<DWORD>(0x706E8C, 0x52909090);
|
Patch<DWORD>(0x706E8C, 0x52909090);
|
||||||
InjectHook(0x706E92, &CShadowCamera::Update);
|
InjectHook(0x706E92, &CShadowCamera::Update);
|
||||||
|
@ -2591,9 +2592,9 @@ BOOL InjectDelayedPatches_Steam()
|
||||||
GetModuleFileNameW(hDLLModule, wcModulePath, _countof(wcModulePath) - 3); // Minus max required space for extension
|
GetModuleFileNameW(hDLLModule, wcModulePath, _countof(wcModulePath) - 3); // Minus max required space for extension
|
||||||
PathRenameExtensionW(wcModulePath, L".ini");
|
PathRenameExtensionW(wcModulePath, L".ini");
|
||||||
|
|
||||||
bool bHasImVehFt = GetModuleHandle("ImVehFt.asi") != nullptr;
|
bool bHasImVehFt = GetModuleHandleW(L"ImVehFt.asi") != nullptr;
|
||||||
bool bSAMP = GetModuleHandle("samp") != nullptr;
|
bool bSAMP = GetModuleHandleW(L"samp") != nullptr;
|
||||||
bool bSARender = GetModuleHandle("SARender.asi") != nullptr;
|
bool bSARender = GetModuleHandleW(L"SARender.asi") != nullptr;
|
||||||
|
|
||||||
ReadRotorFixExceptions(wcModulePath);
|
ReadRotorFixExceptions(wcModulePath);
|
||||||
|
|
||||||
|
@ -2765,7 +2766,7 @@ BOOL InjectDelayedPatches_Steam()
|
||||||
}
|
}
|
||||||
|
|
||||||
// SSE conflicts
|
// SSE conflicts
|
||||||
if ( GetModuleHandle("shadows.asi") == nullptr )
|
if ( GetModuleHandleW(L"shadows.asi") == nullptr )
|
||||||
{
|
{
|
||||||
Patch<DWORD>(0x74A864, 0x52909090);
|
Patch<DWORD>(0x74A864, 0x52909090);
|
||||||
InjectHook(0x74A86A, &CShadowCamera::Update);
|
InjectHook(0x74A86A, &CShadowCamera::Update);
|
||||||
|
@ -4515,7 +4516,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
ScopedUnprotect::Section Protect2( hGameHandle, ".rdata" );
|
ScopedUnprotect::Section Protect2( hGameHandle, ".rdata" );
|
||||||
|
|
||||||
if (*(DWORD*)DynBaseAddress(0x82457C) == 0x94BF || *(DWORD*)DynBaseAddress(0x8245BC) == 0x94BF) Patch_SA_10();
|
if (*(DWORD*)DynBaseAddress(0x82457C) == 0x94BF || *(DWORD*)DynBaseAddress(0x8245BC) == 0x94BF) Patch_SA_10();
|
||||||
else if (*(DWORD*)DynBaseAddress(0x8252FC) == 0x94BF || *(DWORD*)DynBaseAddress(0x82533C) == 0x94BF) Patch_SA_11(), MessageBox( nullptr, "You're using a 1.01 executable which is no longer supported by SilentPatch!\n\nI have no idea if anyone was still using it, so if you do - shoot me an e-mail!", "SilentPatch", MB_OK | MB_ICONWARNING );
|
else if (*(DWORD*)DynBaseAddress(0x8252FC) == 0x94BF || *(DWORD*)DynBaseAddress(0x82533C) == 0x94BF) Patch_SA_11(), MessageBoxW( nullptr, L"You're using a 1.01 executable which is no longer supported by SilentPatch!\n\nI have no idea if anyone was still using it, so if you do - shoot me an e-mail!", L"SilentPatch", MB_OK | MB_ICONWARNING );
|
||||||
else if (*(DWORD*)DynBaseAddress(0x85EC4A) == 0x94BF) Patch_SA_Steam();
|
else if (*(DWORD*)DynBaseAddress(0x85EC4A) == 0x94BF) Patch_SA_Steam();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,14 +20,14 @@
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PlatformToolset>v141_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PlatformToolset>v141_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<SILENTPATCH_EXT>.asi</SILENTPATCH_EXT>
|
<SILENTPATCH_EXT>.asi</SILENTPATCH_EXT>
|
||||||
<SILENTPATCH_FULL_NAME>SilentPatch for San Andreas</SILENTPATCH_FULL_NAME>
|
<SILENTPATCH_FULL_NAME>SilentPatch for San Andreas</SILENTPATCH_FULL_NAME>
|
||||||
<SILENTPATCH_REVISION_ID>29</SILENTPATCH_REVISION_ID>
|
<SILENTPATCH_REVISION_ID>29</SILENTPATCH_REVISION_ID>
|
||||||
<SILENTPATCH_BUILD_ID>0</SILENTPATCH_BUILD_ID>
|
<SILENTPATCH_BUILD_ID>1</SILENTPATCH_BUILD_ID>
|
||||||
<SILENTPATCH_COPYRIGHT>2014-2017</SILENTPATCH_COPYRIGHT>
|
<SILENTPATCH_COPYRIGHT>2014-2017</SILENTPATCH_COPYRIGHT>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
|
|
|
@ -151,9 +151,9 @@ char* GetMyDocumentsPath()
|
||||||
|
|
||||||
if ( cUserFilesPath[0] == '\0' )
|
if ( cUserFilesPath[0] == '\0' )
|
||||||
{
|
{
|
||||||
SHGetFolderPath(nullptr, CSIDL_MYDOCUMENTS, nullptr, SHGFP_TYPE_CURRENT, cUserFilesPath);
|
SHGetFolderPathA(nullptr, CSIDL_MYDOCUMENTS, nullptr, SHGFP_TYPE_CURRENT, cUserFilesPath);
|
||||||
PathAppend(cUserFilesPath, *ppUserFilesDir);
|
PathAppendA(cUserFilesPath, *ppUserFilesDir);
|
||||||
CreateDirectory(cUserFilesPath, nullptr);
|
CreateDirectoryA(cUserFilesPath, nullptr);
|
||||||
}
|
}
|
||||||
return cUserFilesPath;
|
return cUserFilesPath;
|
||||||
}
|
}
|
||||||
|
@ -659,7 +659,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
CTimer::Initialise();
|
CTimer::Initialise();
|
||||||
|
|
||||||
HMODULE hDummyHandle;
|
HMODULE hDummyHandle;
|
||||||
GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCSTR)&DllMain, &hDummyHandle);
|
GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCWSTR)&DllMain, &hDummyHandle);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
|
@ -20,14 +20,14 @@
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PlatformToolset>v141_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PlatformToolset>v141_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
|
Loading…
Reference in a new issue