-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSteam_API_Base.h
More file actions
83 lines (66 loc) · 3.1 KB
/
Steam_API_Base.h
File metadata and controls
83 lines (66 loc) · 3.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//Client
HMODULE hSteamclient_Client = nullptr;
HSteamPipe hPipe = 0;
HSteamUser hUser = 0;
ISteamClient *SteamClient_Client = nullptr;
ISteamClient *SteamClientSafe = nullptr;
ISteamUtils *SteamUtilsForCallbacks = nullptr;
ISteamController *SteamControllerForCallbacks = nullptr;
ISteamInput *SteamInputForCallbacks = nullptr;
CSteamAPIContext GetInterfacePointers;
bool InitClientPointers = false;
SRWLOCK ContextLock;
//Server
HMODULE hSteamclient_Server = nullptr;
HSteamPipe hPipeServer = 0;
HSteamUser hUserServer = 0;
ISteamClient *SteamClient_Server = nullptr;
ISteamGameServer *pSteamGameServer = nullptr;
ISteamUtils *pSteamUtilsServer = nullptr;
CSteamGameServerAPIContext GetGameServerInterfacePointers;
bool InitGameServerPointers = false;
EServerMode eGameServerMode = eServerModeInvalid;
//Breakpad
bool UsingBreakpadCrashHandler = false;
bool FullMemoryDumps = false;
void *BreakpadContext = nullptr;
PFNPreMinidumpCallback BreakpadMinidumpCallback = nullptr;
char szBreakpadVersion[64] = { 0 };
char szBreakpadTimeAndDate[64] = { 0 };
uint32 BreakpadAppID = 0;
uint64 BreakpadSteamID = 0;
bool TryCatch = false;
int UseManualDispatch = 0;
char szSteamInstallPath[MAX_PATH] = { 0 };
bool AlreadyHaveInstallPath = false;
SRWLOCK CallbackLock;
void WriteColoredText(WORD Color, WORD OriginalColor, const char* Text);
void* InternalAPI_Init(HMODULE* hSteamclient, bool bInitLocal, const char *Interface);
void LoadBreakpad(HMODULE hSteamclient);
void SetMinidumpSteamID(uint64 SteamID);
typedef void* (S_CALLTYPE *_CreateInterface)(const char *pName, int *pReturnCode);
_CreateInterface oCreateInterface = nullptr;
typedef void (S_CALLTYPE *_ReleaseThreadLocalMemory)(int bThreadExit);
_ReleaseThreadLocalMemory oReleaseThreadLocalMemory = nullptr;
typedef bool (S_CALLTYPE* _IsKnownInterface)(const char *Interface);
_IsKnownInterface oIsKnownInterface = nullptr;
typedef void (S_CALLTYPE* _NotifyMissingInterface)(HSteamPipe hSteamPipe, const char* Interface);
_NotifyMissingInterface oNotifyMissingInterface = nullptr;
//Breakpad Functions
typedef void (S_CALLTYPE *_Breakpad_SteamMiniDumpInit)(uint32 AppID, const char *pchVersion, const char *Dates, bool bFullMemoryDumps, void *pvContext, PFNPreMinidumpCallback m_pfnPreMinidumpCallback);
_Breakpad_SteamMiniDumpInit oBreakpad_SteamMiniDumpInit = nullptr;
typedef void (S_CALLTYPE *_Breakpad_SteamSetAppID)(uint32 AppID);
_Breakpad_SteamSetAppID oBreakpad_SteamSetAppID = nullptr;
typedef void (S_CALLTYPE *_Breakpad_SteamSetSteamID)(uint64 ulSteamID);
_Breakpad_SteamSetSteamID oBreakpad_SteamSetSteamID = nullptr;
typedef void (S_CALLTYPE *_Breakpad_SteamWriteMiniDumpSetComment)(const char *Comment);
_Breakpad_SteamWriteMiniDumpSetComment oBreakpad_SteamWriteMiniDumpSetComment = nullptr;
typedef void (S_CALLTYPE *_Breakpad_SteamWriteMiniDumpUsingExceptionInfoWithBuildId)(uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID);
_Breakpad_SteamWriteMiniDumpUsingExceptionInfoWithBuildId oBreakpad_SteamWriteMiniDumpUsingExceptionInfoWithBuildId = nullptr;
uintp ContextCounter = 0;
struct ContextInit
{
void(*pFn)(void* pCtx);
uintp Counter;
CSteamAPIContext ctx;
};