MCPcopy Create free account
hub / github.com/Selectively11/CloudRedirect / SEH_WriteResponseHeader

Function SEH_WriteResponseHeader

src/platform/win/cloud_intercept.cpp:1701–1713  ·  view source on GitHub ↗

SEH-safe header field writing

Source from the content-addressed store, hash-verified

1699
1700// SEH-safe header field writing
1701static bool SEH_WriteResponseHeader(void* respHeader, int32_t eresult = 1) {
1702 __try {
1703 *(uint32_t*)((uintptr_t)respHeader + 16) |= 0x20000000u;
1704 *(int32_t*)((uintptr_t)respHeader + 216) = eresult;
1705
1706 *(uint32_t*)((uintptr_t)respHeader + 16) |= 0x40000000u;
1707 *(int32_t*)((uintptr_t)respHeader + 220) = 0;
1708 return true;
1709 } __except(EXCEPTION_EXECUTE_HANDLER) {
1710 LOG("[VtHook] EXCEPTION writing response header: code=0x%08X", GetExceptionCode());
1711 return false;
1712 }
1713}
1714
1715// Shared Cloud RPC dispatch - routes a method name to the appropriate handler.
1716// Returns std::nullopt if the method is not a recognized Cloud RPC we handle.

Callers 1

ServiceMethodHookFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected