source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

Windows dedicated server is broken

Open eepycats opened this issue 10 months ago • 1 comments

SteamAPI_Init never gets called so SteamInternal_ContextInit from FileSystem_LoadSearchPaths fails. Can be temporarily mitigated by using ghostinj to load a dll which does the following:

#include <windows.h>
BOOL WINAPI DllMain(
    HINSTANCE hinstDLL,  // handle to DLL module
    DWORD fdwReason,     // reason for calling function
    LPVOID lpvReserved)  // reserved
{
    // Perform actions based on the reason for calling.
    if (fdwReason == DLL_PROCESS_ATTACH) {
        HMODULE steamapi = LoadLibrary(L"steam_api64.dll");
        if (steamapi) {
            auto proc = GetProcAddress(steamapi, "SteamAPI_Init");
            if (proc) {
                using fn = bool(*)();
                reinterpret_cast<fn>(proc)();
            }
        }
    }
    return TRUE;  // Successful DLL_PROCESS_ATTACH.
}

eepycats avatar Feb 19 '25 05:02 eepycats

what's a ghostinj

Snowywasbanned avatar Feb 27 '25 16:02 Snowywasbanned

what's a ghostinj

https://github.com/perilouswithadollarsign/cstrike15_src/blob/master/dedicated/sys_common.cpp#L57

eepycats avatar Mar 01 '25 12:03 eepycats