Fix FirewallAPI error
This commit is contained in:
+16
-3
@@ -31,7 +31,7 @@ after_build:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
copy %APPVEYOR_BUILD_FOLDER%\source-code\x64\%CONFIGURATION%\dnsapi.dll %TMP%\update\
|
copy %APPVEYOR_BUILD_FOLDER%\source-code\x64\%CONFIGURATION%\dinput8.dll %TMP%\update\
|
||||||
|
|
||||||
copy %APPVEYOR_BUILD_FOLDER%\source-code\x64\%CONFIGURATION%\*.dva %TMP%\update\plugins\
|
copy %APPVEYOR_BUILD_FOLDER%\source-code\x64\%CONFIGURATION%\*.dva %TMP%\update\plugins\
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ after_build:
|
|||||||
|
|
||||||
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\plugins\pv_equip\sfx.ini %TMP%\update\plugins\pv_equip\
|
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\plugins\pv_equip\sfx.ini %TMP%\update\plugins\pv_equip\
|
||||||
|
|
||||||
copy %APPVEYOR_BUILD_FOLDER%\source-code\x64\%CONFIGURATION%\dnsapi.dll %TMP%\full\
|
copy %APPVEYOR_BUILD_FOLDER%\source-code\x64\%CONFIGURATION%\dinput8.dll %TMP%\full\
|
||||||
|
|
||||||
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\patches\custom_freeplay_text_example.p %TMP%\full\patches\
|
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\patches\custom_freeplay_text_example.p %TMP%\full\patches\
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ after_build:
|
|||||||
|
|
||||||
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\plugins\*.* %TMP%\full\plugins\
|
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\plugins\*.* %TMP%\full\plugins\
|
||||||
|
|
||||||
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\plugins\*.* %TMP%\full\plugins\pv_equip\
|
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\plugins\*.* %TMP%\full\plugins\pv_equip\
|
||||||
|
|
||||||
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\ram\databank\*.dat %TMP%\full\ram\databank\
|
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\ram\databank\*.dat %TMP%\full\ram\databank\
|
||||||
|
|
||||||
@@ -90,5 +90,18 @@ after_build:
|
|||||||
cd %TMP%\update\
|
cd %TMP%\update\
|
||||||
|
|
||||||
7z a %APPVEYOR_BUILD_FOLDER%\PD-Loader-%CONFIGURATION%-Update-AppVeyor.zip *
|
7z a %APPVEYOR_BUILD_FOLDER%\PD-Loader-%CONFIGURATION%-Update-AppVeyor.zip *
|
||||||
|
|
||||||
|
cd %APPVEYOR_BUILD_FOLDER%\source-code\x64\%CONFIGURATION%\
|
||||||
|
|
||||||
|
ren dinput8.dll dnsapi.dll
|
||||||
|
|
||||||
|
cd %TMP%\full\
|
||||||
|
|
||||||
|
7z a %APPVEYOR_BUILD_FOLDER%\PD-Loader-%CONFIGURATION%-AppVeyor-Vista.zip *
|
||||||
|
|
||||||
|
cd %TMP%\update\
|
||||||
|
|
||||||
|
7z a %APPVEYOR_BUILD_FOLDER%\PD-Loader-%CONFIGURATION%-Update-AppVeyor-Vista.zip *
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: PD-Loader-*.zip
|
- path: PD-Loader-*.zip
|
||||||
|
|||||||
Submodule source-code/dependencies/MemoryModule deleted from 5f83e41c3a
@@ -52,7 +52,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<TargetName>dnsapi</TargetName>
|
<TargetName>dinput8</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
|
|||||||
@@ -138,7 +138,10 @@ void LoadOriginalLibrary()
|
|||||||
auto szSystemPath = SHGetKnownFolderPath(FOLDERID_System, 0, nullptr) + L'\\' + szSelfName;
|
auto szSystemPath = SHGetKnownFolderPath(FOLDERID_System, 0, nullptr) + L'\\' + szSelfName;
|
||||||
auto szLocalPath = GetModuleFileNameW(hm); szLocalPath = szLocalPath.substr(0, szLocalPath.find_last_of(L"/\\") + 1);
|
auto szLocalPath = GetModuleFileNameW(hm); szLocalPath = szLocalPath.substr(0, szLocalPath.find_last_of(L"/\\") + 1);
|
||||||
|
|
||||||
if (iequals(szSelfName, L"dnsapi.dll")) {
|
if (iequals(szSelfName, L"dinput8.dll")) {
|
||||||
|
dinput8.LoadOriginalLibrary(LoadLibraryW(szSystemPath));
|
||||||
|
}
|
||||||
|
else if (iequals(szSelfName, L"dnsapi.dll")) {
|
||||||
dnsapi.LoadOriginalLibrary(LoadLibraryW(szSystemPath));
|
dnsapi.LoadOriginalLibrary(LoadLibraryW(szSystemPath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -577,6 +580,15 @@ bool HookKernel32IAT(HMODULE mod, bool exe)
|
|||||||
{
|
{
|
||||||
PIMAGE_IMPORT_BY_NAME import = (PIMAGE_IMPORT_BY_NAME)(hInstance + thunk->u1.AddressOfData);
|
PIMAGE_IMPORT_BY_NAME import = (PIMAGE_IMPORT_BY_NAME)(hInstance + thunk->u1.AddressOfData);
|
||||||
void** p = (void**)(hInstance + (pImports + i)->FirstThunk);
|
void** p = (void**)(hInstance + (pImports + i)->FirstThunk);
|
||||||
|
|
||||||
|
if (iequals(szSelfName, L"dinput8.dll"))
|
||||||
|
{
|
||||||
|
DWORD Protect;
|
||||||
|
VirtualProtect(&p[j], 4, PAGE_EXECUTE_READWRITE, &Protect);
|
||||||
|
|
||||||
|
if ((IMAGE_ORDINAL(thunk->u1.Ordinal)) == 1)
|
||||||
|
p[j] = _DirectInput8Create;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
++thunk;
|
++thunk;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -506,6 +506,18 @@ struct dnsapi_dll
|
|||||||
}
|
}
|
||||||
} dnsapi;
|
} dnsapi;
|
||||||
|
|
||||||
|
struct dinput8_dll
|
||||||
|
{
|
||||||
|
HMODULE dll;
|
||||||
|
FARPROC DirectInput8Create;
|
||||||
|
|
||||||
|
void LoadOriginalLibrary(HMODULE module)
|
||||||
|
{
|
||||||
|
dll = module;
|
||||||
|
shared.LoadOriginalLibrary(dll);
|
||||||
|
DirectInput8Create = GetProcAddress(dll, "DirectInput8Create");
|
||||||
|
}
|
||||||
|
} dinput8;
|
||||||
|
|
||||||
#pragma runtime_checks( "", off )
|
#pragma runtime_checks( "", off )
|
||||||
|
|
||||||
@@ -737,6 +749,8 @@ void _Socket_TcpListen() { dnsapi.Socket_TcpListen(); }
|
|||||||
void _Update_ReplaceAddressRecordsW() { dnsapi.Update_ReplaceAddressRecordsW(); }
|
void _Update_ReplaceAddressRecordsW() { dnsapi.Update_ReplaceAddressRecordsW(); }
|
||||||
void _Util_IsIp6Running() { dnsapi.Util_IsIp6Running(); }
|
void _Util_IsIp6Running() { dnsapi.Util_IsIp6Running(); }
|
||||||
|
|
||||||
|
typedef HRESULT(*fn_DirectInput8Create)(HINSTANCE hinst, DWORD dwVersion, REFIID riidltf, LPVOID* ppvOut, LPUNKNOWN punkOuter);
|
||||||
|
void _DirectInput8Create() { (fn_DirectInput8Create)dinput8.DirectInput8Create(); }
|
||||||
|
|
||||||
void _DllRegisterServer() { shared.DllRegisterServer(); }
|
void _DllRegisterServer() { shared.DllRegisterServer(); }
|
||||||
void _DllUnregisterServer() { shared.DllUnregisterServer(); }
|
void _DllUnregisterServer() { shared.DllUnregisterServer(); }
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
LIBRARY "dinput8"
|
||||||
|
EXPORTS
|
||||||
|
DirectInput8Create = _DirectInput8Create
|
||||||
|
DllCanUnloadNow = _DllCanUnloadNow PRIVATE
|
||||||
|
DllGetClassObject = _DllGetClassObject PRIVATE
|
||||||
|
DllRegisterServer = _DllRegisterServer PRIVATE
|
||||||
|
DllUnregisterServer = _DllUnregisterServer PRIVATE
|
||||||
|
|
||||||
LIBRARY "dnsapi"
|
LIBRARY "dnsapi"
|
||||||
EXPORTS
|
EXPORTS
|
||||||
BreakRecordsIntoBlob = _BreakRecordsIntoBlob
|
BreakRecordsIntoBlob = _BreakRecordsIntoBlob
|
||||||
|
|||||||
Reference in New Issue
Block a user