lsteamclient: Use manual methods instead of codegen for callbacks.

CW-Bug-Id: #22729
This commit is contained in:
Rémi Bernon 2023-09-29 11:34:51 +02:00 committed by Arkadiusz Hiler
parent 9183543836
commit 537b4096a5
14 changed files with 208 additions and 146 deletions

View File

@ -211,14 +211,6 @@ SOURCES = \
cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION010.cpp \
cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION011.cpp \
cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION012.cpp \
cppISteamUtils_SteamUtils002.cpp \
cppISteamUtils_SteamUtils004.cpp \
cppISteamUtils_SteamUtils005.cpp \
cppISteamUtils_SteamUtils006.cpp \
cppISteamUtils_SteamUtils007.cpp \
cppISteamUtils_SteamUtils008.cpp \
cppISteamUtils_SteamUtils009.cpp \
cppISteamUtils_SteamUtils010.cpp \
cppISteamVideo_STEAMVIDEO_INTERFACE_V001.cpp \
cppISteamVideo_STEAMVIDEO_INTERFACE_V002.cpp \
steamclient_manual_141.cpp \
@ -298,4 +290,5 @@ SOURCES = \
struct_converters_157.cpp \
struct_converters_158.cpp \
unix_steam_client_manual.cpp \
unix_steam_utils_manual.cpp \
unixlib_generated.cpp \

View File

@ -100,9 +100,3 @@ void cppISteamUtils_SteamUtils002_GetAPICallFailureReason( struct cppISteamUtils
params->_ret = iface->GetAPICallFailureReason( params->hSteamAPICall );
}
void cppISteamUtils_SteamUtils002_GetAPICallResult( struct cppISteamUtils_SteamUtils002_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils002 *iface = (struct u_ISteamUtils_SteamUtils002 *)params->linux_side;
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, params->pCallback, params->cubCallback, params->iCallbackExpected, params->pbFailed );
}

View File

@ -104,12 +104,6 @@ void cppISteamUtils_SteamUtils004_GetAPICallFailureReason( struct cppISteamUtils
params->_ret = iface->GetAPICallFailureReason( params->hSteamAPICall );
}
void cppISteamUtils_SteamUtils004_GetAPICallResult( struct cppISteamUtils_SteamUtils004_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils004 *iface = (struct u_ISteamUtils_SteamUtils004 *)params->linux_side;
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, params->pCallback, params->cubCallback, params->iCallbackExpected, params->pbFailed );
}
void cppISteamUtils_SteamUtils004_RunFrame( struct cppISteamUtils_SteamUtils004_RunFrame_params *params )
{
struct u_ISteamUtils_SteamUtils004 *iface = (struct u_ISteamUtils_SteamUtils004 *)params->linux_side;

View File

@ -109,12 +109,6 @@ void cppISteamUtils_SteamUtils005_GetAPICallFailureReason( struct cppISteamUtils
params->_ret = iface->GetAPICallFailureReason( params->hSteamAPICall );
}
void cppISteamUtils_SteamUtils005_GetAPICallResult( struct cppISteamUtils_SteamUtils005_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils005 *iface = (struct u_ISteamUtils_SteamUtils005 *)params->linux_side;
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, params->pCallback, params->cubCallback, params->iCallbackExpected, params->pbFailed );
}
void cppISteamUtils_SteamUtils005_RunFrame( struct cppISteamUtils_SteamUtils005_RunFrame_params *params )
{
struct u_ISteamUtils_SteamUtils005 *iface = (struct u_ISteamUtils_SteamUtils005 *)params->linux_side;

View File

@ -111,12 +111,6 @@ void cppISteamUtils_SteamUtils006_GetAPICallFailureReason( struct cppISteamUtils
params->_ret = iface->GetAPICallFailureReason( params->hSteamAPICall );
}
void cppISteamUtils_SteamUtils006_GetAPICallResult( struct cppISteamUtils_SteamUtils006_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils006 *iface = (struct u_ISteamUtils_SteamUtils006 *)params->linux_side;
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, params->pCallback, params->cubCallback, params->iCallbackExpected, params->pbFailed );
}
void cppISteamUtils_SteamUtils006_RunFrame( struct cppISteamUtils_SteamUtils006_RunFrame_params *params )
{
struct u_ISteamUtils_SteamUtils006 *iface = (struct u_ISteamUtils_SteamUtils006 *)params->linux_side;

View File

@ -112,12 +112,6 @@ void cppISteamUtils_SteamUtils007_GetAPICallFailureReason( struct cppISteamUtils
params->_ret = iface->GetAPICallFailureReason( params->hSteamAPICall );
}
void cppISteamUtils_SteamUtils007_GetAPICallResult( struct cppISteamUtils_SteamUtils007_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils007 *iface = (struct u_ISteamUtils_SteamUtils007 *)params->linux_side;
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, params->pCallback, params->cubCallback, params->iCallbackExpected, params->pbFailed );
}
void cppISteamUtils_SteamUtils007_RunFrame( struct cppISteamUtils_SteamUtils007_RunFrame_params *params )
{
struct u_ISteamUtils_SteamUtils007 *iface = (struct u_ISteamUtils_SteamUtils007 *)params->linux_side;

View File

@ -114,12 +114,6 @@ void cppISteamUtils_SteamUtils008_GetAPICallFailureReason( struct cppISteamUtils
params->_ret = iface->GetAPICallFailureReason( params->hSteamAPICall );
}
void cppISteamUtils_SteamUtils008_GetAPICallResult( struct cppISteamUtils_SteamUtils008_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils008 *iface = (struct u_ISteamUtils_SteamUtils008 *)params->linux_side;
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, params->pCallback, params->cubCallback, params->iCallbackExpected, params->pbFailed );
}
void cppISteamUtils_SteamUtils008_RunFrame( struct cppISteamUtils_SteamUtils008_RunFrame_params *params )
{
struct u_ISteamUtils_SteamUtils008 *iface = (struct u_ISteamUtils_SteamUtils008 *)params->linux_side;

View File

@ -120,12 +120,6 @@ void cppISteamUtils_SteamUtils009_GetAPICallFailureReason( struct cppISteamUtils
params->_ret = iface->GetAPICallFailureReason( params->hSteamAPICall );
}
void cppISteamUtils_SteamUtils009_GetAPICallResult( struct cppISteamUtils_SteamUtils009_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils009 *iface = (struct u_ISteamUtils_SteamUtils009 *)params->linux_side;
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, params->pCallback, params->cubCallback, params->iCallbackExpected, params->pbFailed );
}
void cppISteamUtils_SteamUtils009_RunFrame( struct cppISteamUtils_SteamUtils009_RunFrame_params *params )
{
struct u_ISteamUtils_SteamUtils009 *iface = (struct u_ISteamUtils_SteamUtils009 *)params->linux_side;

View File

@ -124,12 +124,6 @@ void cppISteamUtils_SteamUtils010_GetAPICallFailureReason( struct cppISteamUtils
params->_ret = iface->GetAPICallFailureReason( params->hSteamAPICall );
}
void cppISteamUtils_SteamUtils010_GetAPICallResult( struct cppISteamUtils_SteamUtils010_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils010 *iface = (struct u_ISteamUtils_SteamUtils010 *)params->linux_side;
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, params->pCallback, params->cubCallback, params->iCallbackExpected, params->pbFailed );
}
void cppISteamUtils_SteamUtils010_RunFrame( struct cppISteamUtils_SteamUtils010_RunFrame_params *params )
{
struct u_ISteamUtils_SteamUtils010 *iface = (struct u_ISteamUtils_SteamUtils010 *)params->linux_side;

View File

@ -231,6 +231,8 @@ MANUAL_METHODS = {
"ISteamClient_BShutdownIfAllPipesClosed": lambda ver, abi: abi == 'w',
"ISteamClient_CreateSteamPipe": lambda ver, abi: abi == 'w',
"ISteamClient_Set_SteamAPI_CCheckCallbackRegisteredInProcess": lambda ver, abi: abi == 'u' and ver >= 20,
"ISteamUtils_GetAPICallResult": lambda ver, abi: abi == 'u',
}
@ -995,11 +997,6 @@ def handle_method_c(klass, method, winclassname, cppname, out):
for name in names[1:]: out(f' .{name} = {name},\n')
out(u' };\n')
should_gen_callback = "GetAPICallResult" in method.name
if should_gen_callback:
out(u' int w_callback_len = cubCallback;\n')
out(u' void *w_callback = pCallback;\n')
path_conv_utow = PATH_CONV_METHODS_UTOW.get(f'{klass.name}_{method.spelling}', {})
path_conv_wtou = PATH_CONV_METHODS_WTOU.get(f'{klass.name}_{method.spelling}', {})
@ -1011,9 +1008,6 @@ def handle_method_c(klass, method, winclassname, cppname, out):
out(u' TRACE("%p\\n", _this);\n')
if should_gen_callback:
out(u' if (!(params.pCallback = alloc_callback_wtou(iCallbackExpected, w_callback, &params.cubCallback))) return FALSE;\n')
out(f' {cppname}_{method.name}( &params );\n')
should_gen_wrapper = not is_manual_method(klass, method, "u") and \
@ -1022,13 +1016,6 @@ def handle_method_c(klass, method, winclassname, cppname, out):
if should_gen_wrapper:
out(u' params._ret = create_win_interface( pchVersion, params._ret );\n')
if should_gen_callback:
out(u' if (params._ret && params.pCallback != w_callback)\n')
out(u' {\n')
out(u' convert_callback_utow(iCallbackExpected, params.pCallback, params.cubCallback, w_callback, w_callback_len);\n')
out(u' HeapFree(GetProcessHeap(), 0, params.pCallback);\n')
out(u' }\n\n')
for name, conv in filter(lambda x: x[0] in names, path_conv_utow.items()):
out(u' ')
if "ret_size" in path_conv_utow:

View File

@ -48,9 +48,6 @@ unsigned int steamclient_unix_path_to_dos_path( bool api_result, const char *src
void *alloc_mem_for_iface(size_t size, const char *iface_version);
void *alloc_vtable(void *vtable, unsigned int method_count, const char *iface_version);
void *alloc_callback_wtou( int id, void *callback, int *callback_len );
void convert_callback_utow( int id, void *u_callback, int u_callback_len, void *w_callback, int w_callback_len );
extern void start_callback_thread(void) DECLSPEC_HIDDEN;
extern void stop_callback_thread(void) DECLSPEC_HIDDEN;

View File

@ -59,6 +59,9 @@ typedef void (W_STDCALL *w_void_SteamAPI_PostAPIResultInProcess_t)(void);
u_void_SteamAPI_PostAPIResultInProcess_t manual_convert_DEPRECATED_Set_SteamAPI_CPostAPIResultInProcess__a( w_void_SteamAPI_PostAPIResultInProcess_t );
u_void_SteamAPI_PostAPIResultInProcess_t manual_convert_DEPRECATED_Remove_SteamAPI_CPostAPIResultInProcess__a( w_void_SteamAPI_PostAPIResultInProcess_t );
void *alloc_callback_wtou( int id, void *callback, int *callback_len );
void convert_callback_utow( int id, void *u_callback, int u_callback_len, void *w_callback, int w_callback_len );
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */

View File

@ -0,0 +1,202 @@
#include "unix_private.h"
#include "cppISteamUtils_SteamUtils002.hpp"
#include "cppISteamUtils_SteamUtils004.hpp"
#include "cppISteamUtils_SteamUtils005.hpp"
#include "cppISteamUtils_SteamUtils006.hpp"
#include "cppISteamUtils_SteamUtils007.hpp"
#include "cppISteamUtils_SteamUtils008.hpp"
#include "cppISteamUtils_SteamUtils009.hpp"
#include "cppISteamUtils_SteamUtils010.hpp"
/* ISteamUtils_SteamUtils002 */
void cppISteamUtils_SteamUtils002_GetAPICallResult( struct cppISteamUtils_SteamUtils002_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils002 *iface = (struct u_ISteamUtils_SteamUtils002 *)params->linux_side;
int u_callback_len = params->cubCallback;
void *u_callback;
if (!(u_callback = alloc_callback_wtou( params->iCallbackExpected, params->pCallback, &u_callback_len )))
{
params->_ret = FALSE;
return;
}
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, u_callback, u_callback_len,
params->iCallbackExpected, params->pbFailed );
if (params->_ret && u_callback != params->pCallback)
{
convert_callback_utow( params->iCallbackExpected, u_callback, u_callback_len,
params->pCallback, params->cubCallback );
HeapFree( GetProcessHeap(), 0, u_callback );
}
}
/* ISteamUtils_SteamUtils004 */
void cppISteamUtils_SteamUtils004_GetAPICallResult( struct cppISteamUtils_SteamUtils004_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils004 *iface = (struct u_ISteamUtils_SteamUtils004 *)params->linux_side;
int u_callback_len = params->cubCallback;
void *u_callback;
if (!(u_callback = alloc_callback_wtou( params->iCallbackExpected, params->pCallback, &u_callback_len )))
{
params->_ret = FALSE;
return;
}
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, u_callback, u_callback_len,
params->iCallbackExpected, params->pbFailed );
if (params->_ret && u_callback != params->pCallback)
{
convert_callback_utow( params->iCallbackExpected, u_callback, u_callback_len,
params->pCallback, params->cubCallback );
HeapFree( GetProcessHeap(), 0, u_callback );
}
}
/* ISteamUtils_SteamUtils005 */
void cppISteamUtils_SteamUtils005_GetAPICallResult( struct cppISteamUtils_SteamUtils005_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils005 *iface = (struct u_ISteamUtils_SteamUtils005 *)params->linux_side;
int u_callback_len = params->cubCallback;
void *u_callback;
if (!(u_callback = alloc_callback_wtou( params->iCallbackExpected, params->pCallback, &u_callback_len )))
{
params->_ret = FALSE;
return;
}
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, u_callback, u_callback_len,
params->iCallbackExpected, params->pbFailed );
if (params->_ret && u_callback != params->pCallback)
{
convert_callback_utow( params->iCallbackExpected, u_callback, u_callback_len,
params->pCallback, params->cubCallback );
HeapFree( GetProcessHeap(), 0, u_callback );
}
}
/* ISteamUtils_SteamUtils006 */
void cppISteamUtils_SteamUtils006_GetAPICallResult( struct cppISteamUtils_SteamUtils006_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils006 *iface = (struct u_ISteamUtils_SteamUtils006 *)params->linux_side;
int u_callback_len = params->cubCallback;
void *u_callback;
if (!(u_callback = alloc_callback_wtou( params->iCallbackExpected, params->pCallback, &u_callback_len )))
{
params->_ret = FALSE;
return;
}
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, u_callback, u_callback_len,
params->iCallbackExpected, params->pbFailed );
if (params->_ret && u_callback != params->pCallback)
{
convert_callback_utow( params->iCallbackExpected, u_callback, u_callback_len,
params->pCallback, params->cubCallback );
HeapFree( GetProcessHeap(), 0, u_callback );
}
}
/* ISteamUtils_SteamUtils007 */
void cppISteamUtils_SteamUtils007_GetAPICallResult( struct cppISteamUtils_SteamUtils007_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils007 *iface = (struct u_ISteamUtils_SteamUtils007 *)params->linux_side;
int u_callback_len = params->cubCallback;
void *u_callback;
if (!(u_callback = alloc_callback_wtou( params->iCallbackExpected, params->pCallback, &u_callback_len )))
{
params->_ret = FALSE;
return;
}
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, u_callback, u_callback_len,
params->iCallbackExpected, params->pbFailed );
if (params->_ret && u_callback != params->pCallback)
{
convert_callback_utow( params->iCallbackExpected, u_callback, u_callback_len,
params->pCallback, params->cubCallback );
HeapFree( GetProcessHeap(), 0, u_callback );
}
}
/* ISteamUtils_SteamUtils008 */
void cppISteamUtils_SteamUtils008_GetAPICallResult( struct cppISteamUtils_SteamUtils008_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils008 *iface = (struct u_ISteamUtils_SteamUtils008 *)params->linux_side;
int u_callback_len = params->cubCallback;
void *u_callback;
if (!(u_callback = alloc_callback_wtou( params->iCallbackExpected, params->pCallback, &u_callback_len )))
{
params->_ret = FALSE;
return;
}
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, u_callback, u_callback_len,
params->iCallbackExpected, params->pbFailed );
if (params->_ret && u_callback != params->pCallback)
{
convert_callback_utow( params->iCallbackExpected, u_callback, u_callback_len,
params->pCallback, params->cubCallback );
HeapFree( GetProcessHeap(), 0, u_callback );
}
}
/* ISteamUtils_SteamUtils009 */
void cppISteamUtils_SteamUtils009_GetAPICallResult( struct cppISteamUtils_SteamUtils009_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils009 *iface = (struct u_ISteamUtils_SteamUtils009 *)params->linux_side;
int u_callback_len = params->cubCallback;
void *u_callback;
if (!(u_callback = alloc_callback_wtou( params->iCallbackExpected, params->pCallback, &u_callback_len )))
{
params->_ret = FALSE;
return;
}
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, u_callback, u_callback_len,
params->iCallbackExpected, params->pbFailed );
if (params->_ret && u_callback != params->pCallback)
{
convert_callback_utow( params->iCallbackExpected, u_callback, u_callback_len,
params->pCallback, params->cubCallback );
HeapFree( GetProcessHeap(), 0, u_callback );
}
}
/* ISteamUtils_SteamUtils010 */
void cppISteamUtils_SteamUtils010_GetAPICallResult( struct cppISteamUtils_SteamUtils010_GetAPICallResult_params *params )
{
struct u_ISteamUtils_SteamUtils010 *iface = (struct u_ISteamUtils_SteamUtils010 *)params->linux_side;
int u_callback_len = params->cubCallback;
void *u_callback;
if (!(u_callback = alloc_callback_wtou( params->iCallbackExpected, params->pCallback, &u_callback_len )))
{
params->_ret = FALSE;
return;
}
params->_ret = iface->GetAPICallResult( params->hSteamAPICall, u_callback, u_callback_len,
params->iCallbackExpected, params->pbFailed );
if (params->_ret && u_callback != params->pCallback)
{
convert_callback_utow( params->iCallbackExpected, u_callback, u_callback_len,
params->pCallback, params->cubCallback );
HeapFree( GetProcessHeap(), 0, u_callback );
}
}

View File

@ -185,17 +185,8 @@ bool __thiscall winISteamUtils_SteamUtils002_GetAPICallResult(struct w_steam_ifa
.iCallbackExpected = iCallbackExpected,
.pbFailed = pbFailed,
};
int w_callback_len = cubCallback;
void *w_callback = pCallback;
TRACE("%p\n", _this);
if (!(params.pCallback = alloc_callback_wtou(iCallbackExpected, w_callback, &params.cubCallback))) return FALSE;
cppISteamUtils_SteamUtils002_GetAPICallResult( &params );
if (params._ret && params.pCallback != w_callback)
{
convert_callback_utow(iCallbackExpected, params.pCallback, params.cubCallback, w_callback, w_callback_len);
HeapFree(GetProcessHeap(), 0, params.pCallback);
}
return params._ret;
}
@ -419,17 +410,8 @@ bool __thiscall winISteamUtils_SteamUtils004_GetAPICallResult(struct w_steam_ifa
.iCallbackExpected = iCallbackExpected,
.pbFailed = pbFailed,
};
int w_callback_len = cubCallback;
void *w_callback = pCallback;
TRACE("%p\n", _this);
if (!(params.pCallback = alloc_callback_wtou(iCallbackExpected, w_callback, &params.cubCallback))) return FALSE;
cppISteamUtils_SteamUtils004_GetAPICallResult( &params );
if (params._ret && params.pCallback != w_callback)
{
convert_callback_utow(iCallbackExpected, params.pCallback, params.cubCallback, w_callback, w_callback_len);
HeapFree(GetProcessHeap(), 0, params.pCallback);
}
return params._ret;
}
@ -705,17 +687,8 @@ bool __thiscall winISteamUtils_SteamUtils005_GetAPICallResult(struct w_steam_ifa
.iCallbackExpected = iCallbackExpected,
.pbFailed = pbFailed,
};
int w_callback_len = cubCallback;
void *w_callback = pCallback;
TRACE("%p\n", _this);
if (!(params.pCallback = alloc_callback_wtou(iCallbackExpected, w_callback, &params.cubCallback))) return FALSE;
cppISteamUtils_SteamUtils005_GetAPICallResult( &params );
if (params._ret && params.pCallback != w_callback)
{
convert_callback_utow(iCallbackExpected, params.pCallback, params.cubCallback, w_callback, w_callback_len);
HeapFree(GetProcessHeap(), 0, params.pCallback);
}
return params._ret;
}
@ -1062,17 +1035,8 @@ bool __thiscall winISteamUtils_SteamUtils006_GetAPICallResult(struct w_steam_ifa
.iCallbackExpected = iCallbackExpected,
.pbFailed = pbFailed,
};
int w_callback_len = cubCallback;
void *w_callback = pCallback;
TRACE("%p\n", _this);
if (!(params.pCallback = alloc_callback_wtou(iCallbackExpected, w_callback, &params.cubCallback))) return FALSE;
cppISteamUtils_SteamUtils006_GetAPICallResult( &params );
if (params._ret && params.pCallback != w_callback)
{
convert_callback_utow(iCallbackExpected, params.pCallback, params.cubCallback, w_callback, w_callback_len);
HeapFree(GetProcessHeap(), 0, params.pCallback);
}
return params._ret;
}
@ -1444,17 +1408,8 @@ bool __thiscall winISteamUtils_SteamUtils007_GetAPICallResult(struct w_steam_ifa
.iCallbackExpected = iCallbackExpected,
.pbFailed = pbFailed,
};
int w_callback_len = cubCallback;
void *w_callback = pCallback;
TRACE("%p\n", _this);
if (!(params.pCallback = alloc_callback_wtou(iCallbackExpected, w_callback, &params.cubCallback))) return FALSE;
cppISteamUtils_SteamUtils007_GetAPICallResult( &params );
if (params._ret && params.pCallback != w_callback)
{
convert_callback_utow(iCallbackExpected, params.pCallback, params.cubCallback, w_callback, w_callback_len);
HeapFree(GetProcessHeap(), 0, params.pCallback);
}
return params._ret;
}
@ -1842,17 +1797,8 @@ bool __thiscall winISteamUtils_SteamUtils008_GetAPICallResult(struct w_steam_ifa
.iCallbackExpected = iCallbackExpected,
.pbFailed = pbFailed,
};
int w_callback_len = cubCallback;
void *w_callback = pCallback;
TRACE("%p\n", _this);
if (!(params.pCallback = alloc_callback_wtou(iCallbackExpected, w_callback, &params.cubCallback))) return FALSE;
cppISteamUtils_SteamUtils008_GetAPICallResult( &params );
if (params._ret && params.pCallback != w_callback)
{
convert_callback_utow(iCallbackExpected, params.pCallback, params.cubCallback, w_callback, w_callback_len);
HeapFree(GetProcessHeap(), 0, params.pCallback);
}
return params._ret;
}
@ -2269,17 +2215,8 @@ bool __thiscall winISteamUtils_SteamUtils009_GetAPICallResult(struct w_steam_ifa
.iCallbackExpected = iCallbackExpected,
.pbFailed = pbFailed,
};
int w_callback_len = cubCallback;
void *w_callback = pCallback;
TRACE("%p\n", _this);
if (!(params.pCallback = alloc_callback_wtou(iCallbackExpected, w_callback, &params.cubCallback))) return FALSE;
cppISteamUtils_SteamUtils009_GetAPICallResult( &params );
if (params._ret && params.pCallback != w_callback)
{
convert_callback_utow(iCallbackExpected, params.pCallback, params.cubCallback, w_callback, w_callback_len);
HeapFree(GetProcessHeap(), 0, params.pCallback);
}
return params._ret;
}
@ -2777,17 +2714,8 @@ bool __thiscall winISteamUtils_SteamUtils010_GetAPICallResult(struct w_steam_ifa
.iCallbackExpected = iCallbackExpected,
.pbFailed = pbFailed,
};
int w_callback_len = cubCallback;
void *w_callback = pCallback;
TRACE("%p\n", _this);
if (!(params.pCallback = alloc_callback_wtou(iCallbackExpected, w_callback, &params.cubCallback))) return FALSE;
cppISteamUtils_SteamUtils010_GetAPICallResult( &params );
if (params._ret && params.pCallback != w_callback)
{
convert_callback_utow(iCallbackExpected, params.pCallback, params.cubCallback, w_callback, w_callback_len);
HeapFree(GetProcessHeap(), 0, params.pCallback);
}
return params._ret;
}