Skip to content

rc_client_begin_load_raintegration

Jamiras edited this page Feb 22, 2024 · 2 revisions

Begins loading the RAIntegration dll.

Syntax

rc_client_async_handle_t* rc_client_begin_load_raintegration(
    rc_client_t* client,
    const wchar_t* search_directory,
    HWND main_window_handle,
    const char* client_name,
    const char* client_version,
    rc_client_callback_t callback,
    void* callback_userdata
);

Parameters

client

The rc_client_t to manage the game.

search_directory

The directory in which to search for the RAIntegration DLL.

main_window_handle

The handle of the window to use as the parent for the toolkit windows.

client_name

The name of the client to use for server requests made within the DLL.

client_version

The version of the client to use for server requests made within the DLL.

callback

Function to call when the DLL load process completes.

callback_userdata

Additional information to pass to the callback function.

Returns

Pointer to an rc_client_async_handle_t that can be passed to rc_client_abort_async to cancel the DLL load process. The rc_client_async_handle_t is invalid after callback has been called.


rc_client_callback_t

void (*rc_client_callback_t)(
    int result,
    const char* error_message,
    rc_client_t* client,
    void* userdata
);

result

RC_OK on success, or an error code indicating the failure.

result problem
RC_OK DLL was successfully loaded.
RC_MISSING_VALUE The DLL was not found.
RC_ABORTED The DLL could not be loaded. This is usually the result of trying to load a non-64 bit DLL in a 64-bit process (or vice versa), but may also occur if the DLL is not a supported version. See error_message for details.
RC_INVALID_STATE Generic failure. See error_message for details.
RC_INVALID_JSON Server response could not be processed.
RC_API_FAILURE Error occurred on the server. See error_message for details.

error_message

NULL on success, or a message related to a non-successful result.

client

The rc_client_t that was handling the load game attempt.

userdata

A client provided pointer passed to the begin function as callback_userdata.

Remarks

In an x64 build, the code will look for an "RA_Integration-x64.dll" in the specified directory. If not found, it will also check for a "RA_Integration.dll" in the specified directory. In either case, the DLL must be an x64 version of the DLL.

In a non-x64 build, the code will only look for "RA_Integration.dll" in the specified directory. It must not be an x64 version of the DLL.

Minimum version: 11.2.0

See also

rc_client_raintegration_set_event_handler

rc_client_raintegration_set_write_memory_function

rc_client_raintegration_update_main_window_handle

rc_client_unload_raintegration

rcheevos
rc_client

Integration guide

client

user

game

processing

rc_client_raintegration

Integration guide

rc_runtime
rhash
rapi

common

user

runtime

info

Clone this wiki locally