Function loadorder_ffi::lo_create_handle[][src]

#[no_mangle]
pub unsafe extern "C" fn lo_create_handle(
    handle: *mut lo_game_handle,
    game_id: c_uint,
    game_path: *const c_char,
    local_path: *const c_char
) -> c_uint

Initialise a new game handle.

Creates a handle for a game, which is then used by all load order and active plugin functions. If the game uses the textfile-based load order system, this function also checks if the two load order files are in sync, provided they both exist.

The game ID is one of the LIBLO_GAME_* constants.

The game path is the directory where the game's executable is found.

The local path is the game's local application data folder, found within %LOCALAPPDATA% on Windows. If running on Windows, the local_path can be null, in which case libloadorder will look the path up itself. However, on other operating systems, lookup is not possible, and this function must be used to provide the necessary path.

Returns LIBLO_OK if successful, otherwise a LIBLO_ERROR_* code is returned.