From c96b53aff2089a15bb0685ad9e7ceb8b5e2e9d4e Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Tue, 14 Apr 2026 11:35:47 -0500 Subject: [PATCH 1/6] Update vcpkg targets --- vcpkg-configuration.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json index 723deeed..e5913bcf 100644 --- a/vcpkg-configuration.json +++ b/vcpkg-configuration.json @@ -2,19 +2,19 @@ "default-registry": { "kind": "git", "repository": "https://github.com/Microsoft/vcpkg", - "baseline": "294f76666c3000630d828703e675814c05a4fd43" + "baseline": "74e6536215718009aae747d86d84b78376bf9e09" }, "registries": [ { "kind": "git", "repository": "https://github.com/Microsoft/vcpkg", - "baseline": "294f76666c3000630d828703e675814c05a4fd43", + "baseline": "74e6536215718009aae747d86d84b78376bf9e09", "packages": ["boost*", "boost-*"] }, { "kind": "git", "repository": "https://github.com/ModOrganizer2/vcpkg-registry", - "baseline": "27d8adbfe9e4ce88a875be3a45fadab69869eb60", + "baseline": "8beb2e0efa9c17dd6d17bb05288dd1e40727f673", "packages": ["asmjit", "spdlog"] } ] From 8507a2b3d38ee4605d7e148b6c35d6c5bf9b7ecf Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Tue, 14 Apr 2026 13:35:59 -0500 Subject: [PATCH 2/6] Lint --- src/shared/ntdll_declarations.h | 4 ++-- src/thooklib/hooklib.cpp | 4 ++-- src/usvfs_dll/hookcontext.cpp | 4 ++-- src/usvfs_dll/hooks/file_information_utils.h | 4 ++-- src/usvfs_dll/maptracker.h | 2 +- test/tinjectlib_test/testinject_dll/main.h | 4 ++-- .../usvfs_global_test/usvfs_global_test.cpp | 8 ++++---- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/shared/ntdll_declarations.h b/src/shared/ntdll_declarations.h index 813ad8c9..49079c99 100644 --- a/src/shared/ntdll_declarations.h +++ b/src/shared/ntdll_declarations.h @@ -543,7 +543,7 @@ typedef struct _FILE_NETWORK_OPEN_INFORMATION // Nt -using NtQueryDirectoryFile_type = NTSTATUS(WINAPI*)(HANDLE, HANDLE, PIO_APC_ROUTINE, +using NtQueryDirectoryFile_type = NTSTATUS(WINAPI*)(HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID, PIO_STATUS_BLOCK, PVOID, ULONG, FILE_INFORMATION_CLASS, BOOLEAN, PUNICODE_STRING, BOOLEAN); @@ -569,7 +569,7 @@ using NtQueryInformationByName_type = NTSTATUS(WINAPI*)( ULONG Length, FILE_INFORMATION_CLASS FileInformationClass); using NtOpenFile_type = NTSTATUS(WINAPI*)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, - PIO_STATUS_BLOCK, ULONG, ULONG); + PIO_STATUS_BLOCK, ULONG, ULONG); using NtCreateFile_type = NTSTATUS(WINAPI*)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK, PLARGE_INTEGER, ULONG, ULONG, ULONG, ULONG, PVOID, ULONG); diff --git a/src/thooklib/hooklib.cpp b/src/thooklib/hooklib.cpp index 9dbbafaa..12745f8a 100644 --- a/src/thooklib/hooklib.cpp +++ b/src/thooklib/hooklib.cpp @@ -113,8 +113,8 @@ void WriteLongJump(LPBYTE jumpAddr, LPVOID destination) // a working, space-optimized, relative jump to outside the generated code and // we do want to optimize this jump #if BOOST_ARCH_X86_64 - intptr_t dist = reinterpret_cast(destination) - - (reinterpret_cast(jumpAddr) + 5); + intptr_t dist = reinterpret_cast(destination) - + (reinterpret_cast(jumpAddr) + 5); int32_t distShort = static_cast(dist); #else int32_t distShort = reinterpret_cast(destination) - diff --git a/src/usvfs_dll/hookcontext.cpp b/src/usvfs_dll/hookcontext.cpp index f47e42d9..233df91c 100644 --- a/src/usvfs_dll/hookcontext.cpp +++ b/src/usvfs_dll/hookcontext.cpp @@ -316,8 +316,8 @@ void HookContext::unlockShared(const HookContext* instance) // deprecated // -extern "C" DLLEXPORT HookContext* __cdecl CreateHookContext( - const USVFSParameters& oldParams, HMODULE module) +extern "C" DLLEXPORT HookContext* __cdecl +CreateHookContext(const USVFSParameters& oldParams, HMODULE module) { const usvfsParameters p(oldParams); return usvfsCreateHookContext(p, module); diff --git a/src/usvfs_dll/hooks/file_information_utils.h b/src/usvfs_dll/hooks/file_information_utils.h index dbd35974..6d11f095 100644 --- a/src/usvfs_dll/hooks/file_information_utils.h +++ b/src/usvfs_dll/hooks/file_information_utils.h @@ -16,8 +16,8 @@ namespace usvfs::details #define DECLARE_HAS_FIELD(Field) \ template \ - constexpr auto HasFieldImpl##Field(int)->decltype(std::declval().Field, void(), \ - std::true_type()) \ + constexpr auto HasFieldImpl##Field(int) \ + -> decltype(std::declval().Field, void(), std::true_type()) \ { \ return {}; \ } \ diff --git a/src/usvfs_dll/maptracker.h b/src/usvfs_dll/maptracker.h index 6ddf471b..ed8daafc 100644 --- a/src/usvfs_dll/maptracker.h +++ b/src/usvfs_dll/maptracker.h @@ -565,7 +565,7 @@ class CreateRerouter // check virtualized paths DWORD virtAttr = GetFileAttributesW(lpFileName); bool isFile = virtAttr != INVALID_FILE_ATTRIBUTES && - (virtAttr & FILE_ATTRIBUTE_DIRECTORY) == 0; + (virtAttr & FILE_ATTRIBUTE_DIRECTORY) == 0; m_isDir = virtAttr != INVALID_FILE_ATTRIBUTES && (virtAttr & FILE_ATTRIBUTE_DIRECTORY); diff --git a/test/tinjectlib_test/testinject_dll/main.h b/test/tinjectlib_test/testinject_dll/main.h index 6faf8002..7ddcc30b 100644 --- a/test/tinjectlib_test/testinject_dll/main.h +++ b/test/tinjectlib_test/testinject_dll/main.h @@ -3,8 +3,8 @@ #define WIN32_LEAN_AND_MEAN #include -extern "C" - __declspec(dllexport) void __cdecl InitNoQuit(LPVOID userData, size_t userDataSize); +extern "C" __declspec(dllexport) void __cdecl InitNoQuit(LPVOID userData, + size_t userDataSize); extern "C" __declspec(dllexport) void __cdecl InitNoParam(LPVOID userData, size_t userDataSize); extern "C" __declspec(dllexport) void __cdecl InitComplexParam(LPVOID userData, diff --git a/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp b/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp index 79c6c4c0..c9cdab92 100644 --- a/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp +++ b/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp @@ -102,8 +102,8 @@ TEST(BasicTest, SimpleTest) } const auto doc_txt = data / "docs" / "doc.txt"; - HandleGuard hdl = CreateFileW(doc_txt.c_str(), GENERIC_READ, 0, nullptr, - OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); + HandleGuard hdl = CreateFileW(doc_txt.c_str(), GENERIC_READ, 0, nullptr, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); ASSERT_NE(INVALID_HANDLE_VALUE, (HANDLE)hdl); WCHAR filepath[1024]; @@ -134,8 +134,8 @@ TEST(BasicTest, SimpleTest) } const auto info_txt = data / "readme.txt"; - HandleGuard hdl = CreateFileW(info_txt.c_str(), GENERIC_READ, 0, nullptr, - OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); + HandleGuard hdl = CreateFileW(info_txt.c_str(), GENERIC_READ, 0, nullptr, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); ASSERT_NE(INVALID_HANDLE_VALUE, (HANDLE)hdl); char buffer[4096]; From 46d6902470b3eee9c427c632fe9e9c05c9f17448 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 18:36:34 +0000 Subject: [PATCH 3/6] [pre-commit.ci] Auto fixes from pre-commit.com hooks. --- src/shared/ntdll_declarations.h | 4 ++-- src/thooklib/hooklib.cpp | 4 ++-- src/usvfs_dll/hookcontext.cpp | 4 ++-- src/usvfs_dll/hooks/file_information_utils.h | 4 ++-- src/usvfs_dll/maptracker.h | 2 +- test/tinjectlib_test/testinject_dll/main.h | 4 ++-- .../usvfs_global_test/usvfs_global_test.cpp | 8 ++++---- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/shared/ntdll_declarations.h b/src/shared/ntdll_declarations.h index 49079c99..813ad8c9 100644 --- a/src/shared/ntdll_declarations.h +++ b/src/shared/ntdll_declarations.h @@ -543,7 +543,7 @@ typedef struct _FILE_NETWORK_OPEN_INFORMATION // Nt -using NtQueryDirectoryFile_type = NTSTATUS(WINAPI*)(HANDLE, HANDLE, PIO_APC_ROUTINE, +using NtQueryDirectoryFile_type = NTSTATUS(WINAPI*)(HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID, PIO_STATUS_BLOCK, PVOID, ULONG, FILE_INFORMATION_CLASS, BOOLEAN, PUNICODE_STRING, BOOLEAN); @@ -569,7 +569,7 @@ using NtQueryInformationByName_type = NTSTATUS(WINAPI*)( ULONG Length, FILE_INFORMATION_CLASS FileInformationClass); using NtOpenFile_type = NTSTATUS(WINAPI*)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, - PIO_STATUS_BLOCK, ULONG, ULONG); + PIO_STATUS_BLOCK, ULONG, ULONG); using NtCreateFile_type = NTSTATUS(WINAPI*)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK, PLARGE_INTEGER, ULONG, ULONG, ULONG, ULONG, PVOID, ULONG); diff --git a/src/thooklib/hooklib.cpp b/src/thooklib/hooklib.cpp index 12745f8a..9dbbafaa 100644 --- a/src/thooklib/hooklib.cpp +++ b/src/thooklib/hooklib.cpp @@ -113,8 +113,8 @@ void WriteLongJump(LPBYTE jumpAddr, LPVOID destination) // a working, space-optimized, relative jump to outside the generated code and // we do want to optimize this jump #if BOOST_ARCH_X86_64 - intptr_t dist = reinterpret_cast(destination) - - (reinterpret_cast(jumpAddr) + 5); + intptr_t dist = reinterpret_cast(destination) - + (reinterpret_cast(jumpAddr) + 5); int32_t distShort = static_cast(dist); #else int32_t distShort = reinterpret_cast(destination) - diff --git a/src/usvfs_dll/hookcontext.cpp b/src/usvfs_dll/hookcontext.cpp index 233df91c..f47e42d9 100644 --- a/src/usvfs_dll/hookcontext.cpp +++ b/src/usvfs_dll/hookcontext.cpp @@ -316,8 +316,8 @@ void HookContext::unlockShared(const HookContext* instance) // deprecated // -extern "C" DLLEXPORT HookContext* __cdecl -CreateHookContext(const USVFSParameters& oldParams, HMODULE module) +extern "C" DLLEXPORT HookContext* __cdecl CreateHookContext( + const USVFSParameters& oldParams, HMODULE module) { const usvfsParameters p(oldParams); return usvfsCreateHookContext(p, module); diff --git a/src/usvfs_dll/hooks/file_information_utils.h b/src/usvfs_dll/hooks/file_information_utils.h index 6d11f095..dbd35974 100644 --- a/src/usvfs_dll/hooks/file_information_utils.h +++ b/src/usvfs_dll/hooks/file_information_utils.h @@ -16,8 +16,8 @@ namespace usvfs::details #define DECLARE_HAS_FIELD(Field) \ template \ - constexpr auto HasFieldImpl##Field(int) \ - -> decltype(std::declval().Field, void(), std::true_type()) \ + constexpr auto HasFieldImpl##Field(int)->decltype(std::declval().Field, void(), \ + std::true_type()) \ { \ return {}; \ } \ diff --git a/src/usvfs_dll/maptracker.h b/src/usvfs_dll/maptracker.h index ed8daafc..6ddf471b 100644 --- a/src/usvfs_dll/maptracker.h +++ b/src/usvfs_dll/maptracker.h @@ -565,7 +565,7 @@ class CreateRerouter // check virtualized paths DWORD virtAttr = GetFileAttributesW(lpFileName); bool isFile = virtAttr != INVALID_FILE_ATTRIBUTES && - (virtAttr & FILE_ATTRIBUTE_DIRECTORY) == 0; + (virtAttr & FILE_ATTRIBUTE_DIRECTORY) == 0; m_isDir = virtAttr != INVALID_FILE_ATTRIBUTES && (virtAttr & FILE_ATTRIBUTE_DIRECTORY); diff --git a/test/tinjectlib_test/testinject_dll/main.h b/test/tinjectlib_test/testinject_dll/main.h index 7ddcc30b..6faf8002 100644 --- a/test/tinjectlib_test/testinject_dll/main.h +++ b/test/tinjectlib_test/testinject_dll/main.h @@ -3,8 +3,8 @@ #define WIN32_LEAN_AND_MEAN #include -extern "C" __declspec(dllexport) void __cdecl InitNoQuit(LPVOID userData, - size_t userDataSize); +extern "C" + __declspec(dllexport) void __cdecl InitNoQuit(LPVOID userData, size_t userDataSize); extern "C" __declspec(dllexport) void __cdecl InitNoParam(LPVOID userData, size_t userDataSize); extern "C" __declspec(dllexport) void __cdecl InitComplexParam(LPVOID userData, diff --git a/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp b/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp index c9cdab92..79c6c4c0 100644 --- a/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp +++ b/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp @@ -102,8 +102,8 @@ TEST(BasicTest, SimpleTest) } const auto doc_txt = data / "docs" / "doc.txt"; - HandleGuard hdl = CreateFileW(doc_txt.c_str(), GENERIC_READ, 0, nullptr, - OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); + HandleGuard hdl = CreateFileW(doc_txt.c_str(), GENERIC_READ, 0, nullptr, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); ASSERT_NE(INVALID_HANDLE_VALUE, (HANDLE)hdl); WCHAR filepath[1024]; @@ -134,8 +134,8 @@ TEST(BasicTest, SimpleTest) } const auto info_txt = data / "readme.txt"; - HandleGuard hdl = CreateFileW(info_txt.c_str(), GENERIC_READ, 0, nullptr, - OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); + HandleGuard hdl = CreateFileW(info_txt.c_str(), GENERIC_READ, 0, nullptr, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); ASSERT_NE(INVALID_HANDLE_VALUE, (HANDLE)hdl); char buffer[4096]; From 40a26d6a03ec7dae12459d8cf68f12e0a717b933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Wed, 15 Apr 2026 09:07:59 +0200 Subject: [PATCH 4/6] Update MO2 registry baseline. --- vcpkg-configuration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json index e5913bcf..937c81f9 100644 --- a/vcpkg-configuration.json +++ b/vcpkg-configuration.json @@ -14,7 +14,7 @@ { "kind": "git", "repository": "https://github.com/ModOrganizer2/vcpkg-registry", - "baseline": "8beb2e0efa9c17dd6d17bb05288dd1e40727f673", + "baseline": "92f063c71cebea1926c7eb183fbe719145395985", "packages": ["asmjit", "spdlog"] } ] From bcba40348cd3df25cf08b669c0c078eb1edda5cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Wed, 15 Apr 2026 09:09:43 +0200 Subject: [PATCH 5/6] Update pre-commit version. --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3103a1f1..149b3587 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: - id: check-merge-conflict - id: check-case-conflict - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v19.1.5 + rev: v22.1.2 hooks: - id: clang-format 'types_or': [c++, c] From 9f00932150a97b65d397b06bebf44152680d0528 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 15 Apr 2026 07:11:31 +0000 Subject: [PATCH 6/6] [pre-commit.ci] Auto fixes from pre-commit.com hooks. --- src/shared/ntdll_declarations.h | 4 ++-- src/thooklib/hooklib.cpp | 4 ++-- src/usvfs_dll/hookcontext.cpp | 4 ++-- src/usvfs_dll/hooks/file_information_utils.h | 4 ++-- src/usvfs_dll/maptracker.h | 2 +- test/tinjectlib_test/testinject_dll/main.h | 4 ++-- .../usvfs_global_test/usvfs_global_test.cpp | 8 ++++---- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/shared/ntdll_declarations.h b/src/shared/ntdll_declarations.h index 813ad8c9..49079c99 100644 --- a/src/shared/ntdll_declarations.h +++ b/src/shared/ntdll_declarations.h @@ -543,7 +543,7 @@ typedef struct _FILE_NETWORK_OPEN_INFORMATION // Nt -using NtQueryDirectoryFile_type = NTSTATUS(WINAPI*)(HANDLE, HANDLE, PIO_APC_ROUTINE, +using NtQueryDirectoryFile_type = NTSTATUS(WINAPI*)(HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID, PIO_STATUS_BLOCK, PVOID, ULONG, FILE_INFORMATION_CLASS, BOOLEAN, PUNICODE_STRING, BOOLEAN); @@ -569,7 +569,7 @@ using NtQueryInformationByName_type = NTSTATUS(WINAPI*)( ULONG Length, FILE_INFORMATION_CLASS FileInformationClass); using NtOpenFile_type = NTSTATUS(WINAPI*)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, - PIO_STATUS_BLOCK, ULONG, ULONG); + PIO_STATUS_BLOCK, ULONG, ULONG); using NtCreateFile_type = NTSTATUS(WINAPI*)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK, PLARGE_INTEGER, ULONG, ULONG, ULONG, ULONG, PVOID, ULONG); diff --git a/src/thooklib/hooklib.cpp b/src/thooklib/hooklib.cpp index 9dbbafaa..12745f8a 100644 --- a/src/thooklib/hooklib.cpp +++ b/src/thooklib/hooklib.cpp @@ -113,8 +113,8 @@ void WriteLongJump(LPBYTE jumpAddr, LPVOID destination) // a working, space-optimized, relative jump to outside the generated code and // we do want to optimize this jump #if BOOST_ARCH_X86_64 - intptr_t dist = reinterpret_cast(destination) - - (reinterpret_cast(jumpAddr) + 5); + intptr_t dist = reinterpret_cast(destination) - + (reinterpret_cast(jumpAddr) + 5); int32_t distShort = static_cast(dist); #else int32_t distShort = reinterpret_cast(destination) - diff --git a/src/usvfs_dll/hookcontext.cpp b/src/usvfs_dll/hookcontext.cpp index f47e42d9..233df91c 100644 --- a/src/usvfs_dll/hookcontext.cpp +++ b/src/usvfs_dll/hookcontext.cpp @@ -316,8 +316,8 @@ void HookContext::unlockShared(const HookContext* instance) // deprecated // -extern "C" DLLEXPORT HookContext* __cdecl CreateHookContext( - const USVFSParameters& oldParams, HMODULE module) +extern "C" DLLEXPORT HookContext* __cdecl +CreateHookContext(const USVFSParameters& oldParams, HMODULE module) { const usvfsParameters p(oldParams); return usvfsCreateHookContext(p, module); diff --git a/src/usvfs_dll/hooks/file_information_utils.h b/src/usvfs_dll/hooks/file_information_utils.h index dbd35974..6d11f095 100644 --- a/src/usvfs_dll/hooks/file_information_utils.h +++ b/src/usvfs_dll/hooks/file_information_utils.h @@ -16,8 +16,8 @@ namespace usvfs::details #define DECLARE_HAS_FIELD(Field) \ template \ - constexpr auto HasFieldImpl##Field(int)->decltype(std::declval().Field, void(), \ - std::true_type()) \ + constexpr auto HasFieldImpl##Field(int) \ + -> decltype(std::declval().Field, void(), std::true_type()) \ { \ return {}; \ } \ diff --git a/src/usvfs_dll/maptracker.h b/src/usvfs_dll/maptracker.h index 6ddf471b..ed8daafc 100644 --- a/src/usvfs_dll/maptracker.h +++ b/src/usvfs_dll/maptracker.h @@ -565,7 +565,7 @@ class CreateRerouter // check virtualized paths DWORD virtAttr = GetFileAttributesW(lpFileName); bool isFile = virtAttr != INVALID_FILE_ATTRIBUTES && - (virtAttr & FILE_ATTRIBUTE_DIRECTORY) == 0; + (virtAttr & FILE_ATTRIBUTE_DIRECTORY) == 0; m_isDir = virtAttr != INVALID_FILE_ATTRIBUTES && (virtAttr & FILE_ATTRIBUTE_DIRECTORY); diff --git a/test/tinjectlib_test/testinject_dll/main.h b/test/tinjectlib_test/testinject_dll/main.h index 6faf8002..7ddcc30b 100644 --- a/test/tinjectlib_test/testinject_dll/main.h +++ b/test/tinjectlib_test/testinject_dll/main.h @@ -3,8 +3,8 @@ #define WIN32_LEAN_AND_MEAN #include -extern "C" - __declspec(dllexport) void __cdecl InitNoQuit(LPVOID userData, size_t userDataSize); +extern "C" __declspec(dllexport) void __cdecl InitNoQuit(LPVOID userData, + size_t userDataSize); extern "C" __declspec(dllexport) void __cdecl InitNoParam(LPVOID userData, size_t userDataSize); extern "C" __declspec(dllexport) void __cdecl InitComplexParam(LPVOID userData, diff --git a/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp b/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp index 79c6c4c0..c9cdab92 100644 --- a/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp +++ b/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp @@ -102,8 +102,8 @@ TEST(BasicTest, SimpleTest) } const auto doc_txt = data / "docs" / "doc.txt"; - HandleGuard hdl = CreateFileW(doc_txt.c_str(), GENERIC_READ, 0, nullptr, - OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); + HandleGuard hdl = CreateFileW(doc_txt.c_str(), GENERIC_READ, 0, nullptr, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); ASSERT_NE(INVALID_HANDLE_VALUE, (HANDLE)hdl); WCHAR filepath[1024]; @@ -134,8 +134,8 @@ TEST(BasicTest, SimpleTest) } const auto info_txt = data / "readme.txt"; - HandleGuard hdl = CreateFileW(info_txt.c_str(), GENERIC_READ, 0, nullptr, - OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); + HandleGuard hdl = CreateFileW(info_txt.c_str(), GENERIC_READ, 0, nullptr, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); ASSERT_NE(INVALID_HANDLE_VALUE, (HANDLE)hdl); char buffer[4096];