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

Function LoadSteamApi

src/platform/win/cloud760_tool.cpp:96–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96static bool LoadSteamApi(SteamApi& api) {
97 api.mod = LoadSteamApiDll();
98 if (!api.mod) {
99 fprintf(stderr,
100 "Error: could not load steam_api.dll.\n"
101 "It should ship next to this tool.\n");
102 return false;
103 }
104
105 bool ok = true;
106 ok &= resolve(api.mod, "SteamAPI_Init", api.Init);
107 ok &= resolve(api.mod, "SteamAPI_Shutdown", api.Shutdown);
108 ok &= resolve(api.mod, "SteamAPI_GetHSteamUser", api.GetHSteamUser);
109 ok &= resolve(api.mod, "SteamAPI_GetHSteamPipe", api.GetHSteamPipe);
110 ok &= resolve(api.mod, "SteamClient", api.SteamClient);
111 ok &= resolve(api.mod, "SteamAPI_ISteamClient_GetISteamRemoteStorage", api.GetISteamRemoteStorage);
112
113 ok &= resolve(api.mod, "SteamAPI_ISteamRemoteStorage_GetFileCount", api.GetFileCount);
114 ok &= resolve(api.mod, "SteamAPI_ISteamRemoteStorage_GetFileNameAndSize", api.GetFileNameAndSize);
115 ok &= resolve(api.mod, "SteamAPI_ISteamRemoteStorage_GetFileSize", api.GetFileSize);
116 ok &= resolve(api.mod, "SteamAPI_ISteamRemoteStorage_GetFileTimestamp", api.GetFileTimestamp);
117 ok &= resolve(api.mod, "SteamAPI_ISteamRemoteStorage_FileExists", api.FileExists);
118 ok &= resolve(api.mod, "SteamAPI_ISteamRemoteStorage_FilePersisted", api.FilePersisted);
119 ok &= resolve(api.mod, "SteamAPI_ISteamRemoteStorage_FileDelete", api.FileDelete);
120 ok &= resolve(api.mod, "SteamAPI_ISteamRemoteStorage_FileForget", api.FileForget);
121 ok &= resolve(api.mod, "SteamAPI_ISteamRemoteStorage_IsCloudEnabledForAccount", api.IsCloudEnabledForAccount);
122 ok &= resolve(api.mod, "SteamAPI_ISteamRemoteStorage_IsCloudEnabledForApp", api.IsCloudEnabledForApp);
123 ok &= resolve(api.mod, "SteamAPI_ISteamRemoteStorage_GetQuota", api.GetQuota);
124 return ok;
125}
126
127// Connect to the running Steam client as `appId`. Mirrors RemoteStorage.cs.
128static bool Connect(SteamApi& api, uint32_t appId) {

Callers 1

mainFunction · 0.85

Calls 2

LoadSteamApiDllFunction · 0.85
resolveFunction · 0.85

Tested by

no test coverage detected