From 516f76e4465883a414bb0ad81aa219fb48e2c116 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Thu, 24 Aug 2023 20:42:23 -0600 Subject: [PATCH] lsteamclient: Terminate callback thread on Steam interface shutdown. CW-Bug-Id: #22649 --- .../cppISteamClient_SteamClient006.cpp | 2 +- .../cppISteamClient_SteamClient007.cpp | 2 +- .../cppISteamClient_SteamClient008.cpp | 2 +- .../cppISteamClient_SteamClient009.cpp | 2 +- .../cppISteamClient_SteamClient010.cpp | 4 +- .../cppISteamClient_SteamClient011.cpp | 4 +- .../cppISteamClient_SteamClient012.cpp | 4 +- .../cppISteamClient_SteamClient013.cpp | 4 +- .../cppISteamClient_SteamClient014.cpp | 4 +- .../cppISteamClient_SteamClient015.cpp | 4 +- .../cppISteamClient_SteamClient016.cpp | 4 +- .../cppISteamClient_SteamClient017.cpp | 4 +- .../cppISteamClient_SteamClient018.cpp | 4 +- .../cppISteamClient_SteamClient019.cpp | 4 +- .../cppISteamClient_SteamClient020.cpp | 4 +- lsteamclient/gen_wrapper.py | 22 ++++++++- lsteamclient/steamclient_main.c | 45 +++++++++++++++++++ lsteamclient/steamclient_private.h | 2 + 18 files changed, 94 insertions(+), 27 deletions(-) diff --git a/lsteamclient/cppISteamClient_SteamClient006.cpp b/lsteamclient/cppISteamClient_SteamClient006.cpp index 5dc65c9b..1a3b23c7 100644 --- a/lsteamclient/cppISteamClient_SteamClient006.cpp +++ b/lsteamclient/cppISteamClient_SteamClient006.cpp @@ -13,7 +13,7 @@ extern "C" { #include "cppISteamClient_SteamClient006.h" HSteamPipe cppISteamClient_SteamClient006_CreateSteamPipe(void *linux_side) { - return ((ISteamClient*)linux_side)->CreateSteamPipe(); + return after_steam_pipe_create(((ISteamClient*)linux_side)->CreateSteamPipe()); } bool cppISteamClient_SteamClient006_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe) diff --git a/lsteamclient/cppISteamClient_SteamClient007.cpp b/lsteamclient/cppISteamClient_SteamClient007.cpp index 321df40e..b05a23a4 100644 --- a/lsteamclient/cppISteamClient_SteamClient007.cpp +++ b/lsteamclient/cppISteamClient_SteamClient007.cpp @@ -13,7 +13,7 @@ extern "C" { #include "cppISteamClient_SteamClient007.h" HSteamPipe cppISteamClient_SteamClient007_CreateSteamPipe(void *linux_side) { - return ((ISteamClient*)linux_side)->CreateSteamPipe(); + return after_steam_pipe_create(((ISteamClient*)linux_side)->CreateSteamPipe()); } bool cppISteamClient_SteamClient007_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe) diff --git a/lsteamclient/cppISteamClient_SteamClient008.cpp b/lsteamclient/cppISteamClient_SteamClient008.cpp index 1343580c..c0c60e1c 100644 --- a/lsteamclient/cppISteamClient_SteamClient008.cpp +++ b/lsteamclient/cppISteamClient_SteamClient008.cpp @@ -13,7 +13,7 @@ extern "C" { #include "cppISteamClient_SteamClient008.h" HSteamPipe cppISteamClient_SteamClient008_CreateSteamPipe(void *linux_side) { - return ((ISteamClient*)linux_side)->CreateSteamPipe(); + return after_steam_pipe_create(((ISteamClient*)linux_side)->CreateSteamPipe()); } bool cppISteamClient_SteamClient008_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe) diff --git a/lsteamclient/cppISteamClient_SteamClient009.cpp b/lsteamclient/cppISteamClient_SteamClient009.cpp index a70cd39a..41b216a6 100644 --- a/lsteamclient/cppISteamClient_SteamClient009.cpp +++ b/lsteamclient/cppISteamClient_SteamClient009.cpp @@ -13,7 +13,7 @@ extern "C" { #include "cppISteamClient_SteamClient009.h" HSteamPipe cppISteamClient_SteamClient009_CreateSteamPipe(void *linux_side) { - return ((ISteamClient*)linux_side)->CreateSteamPipe(); + return after_steam_pipe_create(((ISteamClient*)linux_side)->CreateSteamPipe()); } bool cppISteamClient_SteamClient009_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe) diff --git a/lsteamclient/cppISteamClient_SteamClient010.cpp b/lsteamclient/cppISteamClient_SteamClient010.cpp index ed07b10e..e101e7a8 100644 --- a/lsteamclient/cppISteamClient_SteamClient010.cpp +++ b/lsteamclient/cppISteamClient_SteamClient010.cpp @@ -13,7 +13,7 @@ extern "C" { #include "cppISteamClient_SteamClient010.h" HSteamPipe cppISteamClient_SteamClient010_CreateSteamPipe(void *linux_side) { - return ((ISteamClient*)linux_side)->CreateSteamPipe(); + return after_steam_pipe_create(((ISteamClient*)linux_side)->CreateSteamPipe()); } bool cppISteamClient_SteamClient010_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe) @@ -124,7 +124,7 @@ void cppISteamClient_SteamClient010_SetWarningMessageHook(void *linux_side, Stea bool cppISteamClient_SteamClient010_BShutdownIfAllPipesClosed(void *linux_side) { - return ((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed(); + return after_shutdown(((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed()); } void *cppISteamClient_SteamClient010_GetISteamHTTP(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion) diff --git a/lsteamclient/cppISteamClient_SteamClient011.cpp b/lsteamclient/cppISteamClient_SteamClient011.cpp index 6c45836e..12759965 100644 --- a/lsteamclient/cppISteamClient_SteamClient011.cpp +++ b/lsteamclient/cppISteamClient_SteamClient011.cpp @@ -13,7 +13,7 @@ extern "C" { #include "cppISteamClient_SteamClient011.h" HSteamPipe cppISteamClient_SteamClient011_CreateSteamPipe(void *linux_side) { - return ((ISteamClient*)linux_side)->CreateSteamPipe(); + return after_steam_pipe_create(((ISteamClient*)linux_side)->CreateSteamPipe()); } bool cppISteamClient_SteamClient011_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe) @@ -129,7 +129,7 @@ void cppISteamClient_SteamClient011_SetWarningMessageHook(void *linux_side, Stea bool cppISteamClient_SteamClient011_BShutdownIfAllPipesClosed(void *linux_side) { - return ((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed(); + return after_shutdown(((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed()); } void *cppISteamClient_SteamClient011_GetISteamHTTP(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion) diff --git a/lsteamclient/cppISteamClient_SteamClient012.cpp b/lsteamclient/cppISteamClient_SteamClient012.cpp index 5f9c4fe8..88ff2a0a 100644 --- a/lsteamclient/cppISteamClient_SteamClient012.cpp +++ b/lsteamclient/cppISteamClient_SteamClient012.cpp @@ -13,7 +13,7 @@ extern "C" { #include "cppISteamClient_SteamClient012.h" HSteamPipe cppISteamClient_SteamClient012_CreateSteamPipe(void *linux_side) { - return ((ISteamClient*)linux_side)->CreateSteamPipe(); + return after_steam_pipe_create(((ISteamClient*)linux_side)->CreateSteamPipe()); } bool cppISteamClient_SteamClient012_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe) @@ -124,7 +124,7 @@ void cppISteamClient_SteamClient012_SetWarningMessageHook(void *linux_side, Stea bool cppISteamClient_SteamClient012_BShutdownIfAllPipesClosed(void *linux_side) { - return ((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed(); + return after_shutdown(((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed()); } void *cppISteamClient_SteamClient012_GetISteamHTTP(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion) diff --git a/lsteamclient/cppISteamClient_SteamClient013.cpp b/lsteamclient/cppISteamClient_SteamClient013.cpp index 9fd282e0..88a8bd65 100644 --- a/lsteamclient/cppISteamClient_SteamClient013.cpp +++ b/lsteamclient/cppISteamClient_SteamClient013.cpp @@ -13,7 +13,7 @@ extern "C" { #include "cppISteamClient_SteamClient013.h" HSteamPipe cppISteamClient_SteamClient013_CreateSteamPipe(void *linux_side) { - return ((ISteamClient*)linux_side)->CreateSteamPipe(); + return after_steam_pipe_create(((ISteamClient*)linux_side)->CreateSteamPipe()); } bool cppISteamClient_SteamClient013_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe) @@ -124,7 +124,7 @@ void cppISteamClient_SteamClient013_SetWarningMessageHook(void *linux_side, Stea bool cppISteamClient_SteamClient013_BShutdownIfAllPipesClosed(void *linux_side) { - return ((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed(); + return after_shutdown(((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed()); } void *cppISteamClient_SteamClient013_GetISteamHTTP(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion) diff --git a/lsteamclient/cppISteamClient_SteamClient014.cpp b/lsteamclient/cppISteamClient_SteamClient014.cpp index a015b76c..b1d03d34 100644 --- a/lsteamclient/cppISteamClient_SteamClient014.cpp +++ b/lsteamclient/cppISteamClient_SteamClient014.cpp @@ -13,7 +13,7 @@ extern "C" { #include "cppISteamClient_SteamClient014.h" HSteamPipe cppISteamClient_SteamClient014_CreateSteamPipe(void *linux_side) { - return ((ISteamClient*)linux_side)->CreateSteamPipe(); + return after_steam_pipe_create(((ISteamClient*)linux_side)->CreateSteamPipe()); } bool cppISteamClient_SteamClient014_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe) @@ -124,7 +124,7 @@ void cppISteamClient_SteamClient014_SetWarningMessageHook(void *linux_side, Stea bool cppISteamClient_SteamClient014_BShutdownIfAllPipesClosed(void *linux_side) { - return ((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed(); + return after_shutdown(((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed()); } void *cppISteamClient_SteamClient014_GetISteamHTTP(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion) diff --git a/lsteamclient/cppISteamClient_SteamClient015.cpp b/lsteamclient/cppISteamClient_SteamClient015.cpp index 2f826a21..d1ef808c 100644 --- a/lsteamclient/cppISteamClient_SteamClient015.cpp +++ b/lsteamclient/cppISteamClient_SteamClient015.cpp @@ -13,7 +13,7 @@ extern "C" { #include "cppISteamClient_SteamClient015.h" HSteamPipe cppISteamClient_SteamClient015_CreateSteamPipe(void *linux_side) { - return ((ISteamClient*)linux_side)->CreateSteamPipe(); + return after_steam_pipe_create(((ISteamClient*)linux_side)->CreateSteamPipe()); } bool cppISteamClient_SteamClient015_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe) @@ -124,7 +124,7 @@ void cppISteamClient_SteamClient015_SetWarningMessageHook(void *linux_side, Stea bool cppISteamClient_SteamClient015_BShutdownIfAllPipesClosed(void *linux_side) { - return ((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed(); + return after_shutdown(((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed()); } void *cppISteamClient_SteamClient015_GetISteamHTTP(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion) diff --git a/lsteamclient/cppISteamClient_SteamClient016.cpp b/lsteamclient/cppISteamClient_SteamClient016.cpp index 943e4488..3f8baa6a 100644 --- a/lsteamclient/cppISteamClient_SteamClient016.cpp +++ b/lsteamclient/cppISteamClient_SteamClient016.cpp @@ -13,7 +13,7 @@ extern "C" { #include "cppISteamClient_SteamClient016.h" HSteamPipe cppISteamClient_SteamClient016_CreateSteamPipe(void *linux_side) { - return ((ISteamClient*)linux_side)->CreateSteamPipe(); + return after_steam_pipe_create(((ISteamClient*)linux_side)->CreateSteamPipe()); } bool cppISteamClient_SteamClient016_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe) @@ -124,7 +124,7 @@ void cppISteamClient_SteamClient016_SetWarningMessageHook(void *linux_side, Stea bool cppISteamClient_SteamClient016_BShutdownIfAllPipesClosed(void *linux_side) { - return ((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed(); + return after_shutdown(((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed()); } void *cppISteamClient_SteamClient016_GetISteamHTTP(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion) diff --git a/lsteamclient/cppISteamClient_SteamClient017.cpp b/lsteamclient/cppISteamClient_SteamClient017.cpp index ce6ba1d1..4805ff29 100644 --- a/lsteamclient/cppISteamClient_SteamClient017.cpp +++ b/lsteamclient/cppISteamClient_SteamClient017.cpp @@ -13,7 +13,7 @@ extern "C" { #include "cppISteamClient_SteamClient017.h" HSteamPipe cppISteamClient_SteamClient017_CreateSteamPipe(void *linux_side) { - return ((ISteamClient*)linux_side)->CreateSteamPipe(); + return after_steam_pipe_create(((ISteamClient*)linux_side)->CreateSteamPipe()); } bool cppISteamClient_SteamClient017_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe) @@ -124,7 +124,7 @@ void cppISteamClient_SteamClient017_SetWarningMessageHook(void *linux_side, Stea bool cppISteamClient_SteamClient017_BShutdownIfAllPipesClosed(void *linux_side) { - return ((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed(); + return after_shutdown(((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed()); } void *cppISteamClient_SteamClient017_GetISteamHTTP(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion) diff --git a/lsteamclient/cppISteamClient_SteamClient018.cpp b/lsteamclient/cppISteamClient_SteamClient018.cpp index 26678ba3..468fbf3d 100644 --- a/lsteamclient/cppISteamClient_SteamClient018.cpp +++ b/lsteamclient/cppISteamClient_SteamClient018.cpp @@ -14,7 +14,7 @@ extern "C" { #include "cppISteamClient_SteamClient018.h" HSteamPipe cppISteamClient_SteamClient018_CreateSteamPipe(void *linux_side) { - return ((ISteamClient*)linux_side)->CreateSteamPipe(); + return after_steam_pipe_create(((ISteamClient*)linux_side)->CreateSteamPipe()); } bool cppISteamClient_SteamClient018_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe) @@ -130,7 +130,7 @@ void cppISteamClient_SteamClient018_SetWarningMessageHook(void *linux_side, Stea bool cppISteamClient_SteamClient018_BShutdownIfAllPipesClosed(void *linux_side) { - return ((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed(); + return after_shutdown(((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed()); } void *cppISteamClient_SteamClient018_GetISteamHTTP(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion) diff --git a/lsteamclient/cppISteamClient_SteamClient019.cpp b/lsteamclient/cppISteamClient_SteamClient019.cpp index 7ce8cfb0..04793cbb 100644 --- a/lsteamclient/cppISteamClient_SteamClient019.cpp +++ b/lsteamclient/cppISteamClient_SteamClient019.cpp @@ -14,7 +14,7 @@ extern "C" { #include "cppISteamClient_SteamClient019.h" HSteamPipe cppISteamClient_SteamClient019_CreateSteamPipe(void *linux_side) { - return ((ISteamClient*)linux_side)->CreateSteamPipe(); + return after_steam_pipe_create(((ISteamClient*)linux_side)->CreateSteamPipe()); } bool cppISteamClient_SteamClient019_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe) @@ -130,7 +130,7 @@ void cppISteamClient_SteamClient019_SetWarningMessageHook(void *linux_side, Stea bool cppISteamClient_SteamClient019_BShutdownIfAllPipesClosed(void *linux_side) { - return ((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed(); + return after_shutdown(((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed()); } void *cppISteamClient_SteamClient019_GetISteamHTTP(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion) diff --git a/lsteamclient/cppISteamClient_SteamClient020.cpp b/lsteamclient/cppISteamClient_SteamClient020.cpp index 567923cd..8f33032a 100644 --- a/lsteamclient/cppISteamClient_SteamClient020.cpp +++ b/lsteamclient/cppISteamClient_SteamClient020.cpp @@ -14,7 +14,7 @@ extern "C" { #include "cppISteamClient_SteamClient020.h" HSteamPipe cppISteamClient_SteamClient020_CreateSteamPipe(void *linux_side) { - return ((ISteamClient*)linux_side)->CreateSteamPipe(); + return after_steam_pipe_create(((ISteamClient*)linux_side)->CreateSteamPipe()); } bool cppISteamClient_SteamClient020_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe) @@ -130,7 +130,7 @@ void cppISteamClient_SteamClient020_SetWarningMessageHook(void *linux_side, Stea bool cppISteamClient_SteamClient020_BShutdownIfAllPipesClosed(void *linux_side) { - return ((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed(); + return after_shutdown(((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed()); } void *cppISteamClient_SteamClient020_GetISteamHTTP(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion) diff --git a/lsteamclient/gen_wrapper.py b/lsteamclient/gen_wrapper.py index de3c0741..8a5e65d3 100755 --- a/lsteamclient/gen_wrapper.py +++ b/lsteamclient/gen_wrapper.py @@ -5,7 +5,7 @@ from __future__ import print_function -CLANG_PATH='/usr/lib/clang/13.0.1' +CLANG_PATH='/usr/lib/clang/16' from clang.cindex import CursorKind, Index, Type, TypeKind from collections import namedtuple @@ -232,6 +232,16 @@ manually_handled_methods = { #TODO: Do we need the the value -> pointer conversion for other versions of the interface? Method("InitiateGameConnection", lambda version: version == 8), ], + #"cppISteamClient_SteamClient": [ + # Method("BShutdownIfAllPipesClosed"), + #], +} + + + +post_execution_functions = { + "ISteamClient_BShutdownIfAllPipesClosed" : "after_shutdown", + "ISteamClient_CreateSteamPipe" : "after_steam_pipe_create", } INTERFACE_NAME_VERSION = re.compile(r'^(?P.+?)(?P\d*)$') @@ -246,6 +256,9 @@ def method_needs_manual_handling(interface_with_version, method_name): return method and method.version_func(version) +def post_execution_function(classname, method_name): + return post_execution_functions.get(classname + "_" + method_name) + # manual converters for simple types (function pointers) manual_type_converters = [ "FSteamNetworkingSocketsDebugOutput", @@ -816,6 +829,10 @@ def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, e else: cpp.write(" return ") + post_exec = post_execution_function(classname, method.spelling) + if post_exec != None: + cpp.write(post_exec + '('); + should_do_cb_wrap = "GetAPICallResult" in used_name should_gen_wrapper = cpp != dummy_writer and \ (method.result_type.spelling.startswith("ISteam") or \ @@ -861,7 +878,10 @@ def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, e cpp.write(f"({param.type.spelling}){param.spelling}") if should_gen_wrapper: cfile.write(")") + cfile.write(");\n") + if post_exec != None: + cpp.write(")") cpp.write(");\n") if returns_record: cfile.write(" return _r;\n") diff --git a/lsteamclient/steamclient_main.c b/lsteamclient/steamclient_main.c index 7959d0d5..f216345a 100644 --- a/lsteamclient/steamclient_main.c +++ b/lsteamclient/steamclient_main.c @@ -755,6 +755,21 @@ static void callback_complete(UINT64 cookie) pthread_mutex_unlock(&callback_queue_mutex); } +static void finish_callback_thread(void) +{ + if (!callback_thread_handle) + return; + pthread_mutex_lock(&callback_queue_mutex); + callback_queue_done = TRUE; + pthread_cond_broadcast(&callback_queue_callback_event); + pthread_cond_broadcast(&callback_queue_complete_event); + pthread_mutex_unlock(&callback_queue_mutex); + + WaitForSingleObject(callback_thread_handle, INFINITE); + CloseHandle(callback_thread_handle); + callback_thread_handle = NULL; +} + typedef void (WINAPI *win_FSteamNetworkingSocketsDebugOutput)(ESteamNetworkingSocketsDebugOutputType nType, const char *pszMsg); typedef void (CDECL *win_SteamAPIWarningMessageHook_t)(int, const char *pszMsg); @@ -795,6 +810,7 @@ static DWORD WINAPI callback_thread(void *dummy) break; } } + TRACE("exiting.\n"); return 0; } @@ -1065,3 +1081,32 @@ void CDECL Breakpad_SteamWriteMiniDumpUsingExceptionInfoWithBuildId(int a, int b { TRACE("\n"); } + +bool after_shutdown(bool ret) +{ + TRACE("ret %d.\n", ret); + + if (!ret) + return 0; + finish_callback_thread(); + return ret; +} + +HSteamPipe after_steam_pipe_create(HSteamPipe pipe) +{ + DWORD callback_thread_id; + + TRACE("pipe %#x.\n", pipe); + + if (!pipe) + return 0; + + if (callback_thread_handle) + return pipe; + + callback_queue_done = FALSE; + callback_thread_handle = CreateThread(NULL, 0, callback_thread, NULL, 0, &callback_thread_id); + TRACE("Created callback thread 0x%04x.\n", callback_thread_id); + + return pipe; +} diff --git a/lsteamclient/steamclient_private.h b/lsteamclient/steamclient_private.h index 072300ab..20de7730 100644 --- a/lsteamclient/steamclient_private.h +++ b/lsteamclient/steamclient_private.h @@ -107,6 +107,8 @@ struct callback_data void execute_callback(struct callback_data *cb_data); BOOL is_native_thread(void); +bool after_shutdown(bool); +HSteamPipe after_steam_pipe_create(HSteamPipe pipe); #ifdef __cplusplus }