Skip to content
Stove
Last Updated

External Platform Support Module Reference — Native

Based on SDK version 1.0.0. 35 items combined in alphabetical order.

Contents

NameKindModule
Basic Integration GuideIntegration GuideAPIModule
EStoveAgreeToGameTermsForSteamResultCodeResult CodeAPIModule
EStoveAPIModuleMethodCodeEnumAPIModule
EStoveAPIModuleTypeKindEnumAPIModule
EStoveFetchGameTermsForSteamAgTypeEnumAPIModule
EStoveFetchGameTermsForSteamResultCodeResult CodeAPIModule
EStoveGameCheckerForSteamResultCodeResult CodeAPIModule
EStoveModuleCommonResultCodeResult CodeAPIModule
IModuleAgreeToGameTermsForSteamOutcomeStructAPIModule
IModuleAgreeToGameTermsForSteamParamStructAPIModule
IModuleAPICallbackResultStructAPIModule
IModuleAPIInitializeParamStructAPIModule
IModuleAPIResultStructAPIModule
IModuleFetchGameTermsForSteamContentStructAPIModule
IModuleFetchGameTermsForSteamOutcomeStructAPIModule
IModuleFetchGameTermsForSteamParamStructAPIModule
IModuleGameCheckerForSteamGdsInfoStructAPIModule
IModuleGameCheckerForSteamMaintenanceInfoStructAPIModule
IModuleGameCheckerForSteamMemberStructAPIModule
IModuleGameCheckerForSteamOutcomeStructAPIModule
IModuleGameCheckerForSteamParamStructAPIModule
IModuleGameCheckerForSteamRestrictInfoStructAPIModule
IModuleGameCheckerForSteamUserStructAPIModule
IModuleStoveGDSInfoStructAPIModule
IModuleTypeBaseStructAPIModule
Stove_APIModule_AgreeToGameTermsForSteamFunctionAPIModule
Stove_APIModule_CreateParamFunctionAPIModule
Stove_APIModule_FetchGameTermsForSteamFunctionAPIModule
Stove_APIModule_GameCheckerForSteamFunctionAPIModule
Stove_APIModule_GetGdsInfoFunctionAPIModule
Stove_APIModule_GetVersionFunctionAPIModule
Stove_APIModule_InitializeFunctionAPIModule
Stove_APIModule_RunCallbackFunctionAPIModule
Stove_APIModule_SetLanguageFunctionAPIModule
Stove_APIModule_UnInitializeFunctionAPIModule

Basic Integration Guide

Kind Integration Guide · Module APIModule · Version 1.0.0

Description

APIModule(External Platform Support Module) is a module that enables games launched via the Steam Launcher to use Stove platform features in exactly the same way as if they were launched via the Stove Launcher. This module handles Stove platform authentication using the user's Steam-authenticated credentials and is responsible for obtaining the tokens and account information required to enter the game.

The only supported platform is Steam. We do not support any other third-party platforms. This module does not include the Steamworks SDK; it operates on the assumption that the game has already integrated and initialized the Steamworks SDK.

The developer is responsible for implementing all screens displayed to users (Terms of Service agreement, access denial notices, penalty notices, maintenance notices, and error pop-ups). The module only provides the values to be displayed on the screen and the resulting code.

This module was previously referred to by a different name in earlier documentation. It is the same module, and its current name is APIModule.

Header Configuration

The distribution binary is APIModule.dll, and there are four public headers. To use the functions, include api_module.h; to access the interface members in a C environment, include api_module_flat.h as well.

FileRole
api_module.hDeclaration of SDK User-Defined Functions (Stove_APIModule_*)
api_module_types.hC++ environment: IModule* interface definition (pure virtual function). C environment: opaque typedef struct
api_module_flat.hC-flat accessor for interface members (Stove_IModule<Interface>_<Method>)
api_module_misc.hEnumeration Definitions (TypeKind · MethodCode · Result Code)

Declaration Forms

Interface members are provided in two forms: C++ virtual functions and C flat accessors, and they behave the same way. Flat accessors internally call a virtual function with the same name.

If you're using a development environment that supports C++, it's more convenient to use the C++ virtual function syntax. The code is shorter, and there are fewer type conversions. The C flat accessors were designed to enable integration in development environments that don't support C++ syntax; this serves the same purpose as the Steamworks SDK providing C headers in addition to its C++ interface.

TargetNotation
SDK API functions (such as Stove_APIModule_Initialize)C-flat function (free function, same signature as C/C++)
Interface members (such as GetAccessToken)C++ Virtual Functions + C Flat Accessors
CallbackCallback typedef
  • All public functions are declared as extern "C" + __cdecl. Since a violation of the calling convention in a 32-bit build can cause a stack corruption, you must also adhere to __cdecl when declaring function pointers directly.
  • The header file uses the STOVE_MODULE_API macro to denote this calling convention. In MSVC, it is defined as __cdecl, while in other compilers, it is defined as an empty string. The declarations in this document replicate the header notation exactly, and in the example code, the callback functions defined by the game are written as __cdecl. These two notations have the same meaning in MSVC.
  • Although the header also declares a typedef (<function-name>_t) for the function pointer of each flat function, it is not shown in this document. Please refer to it only when needed for dynamic loading (GetProcAddress).

In each function documentation page, ## Example lists the two forms side by side under the C · C++ tabs. Since calling the same API using either form yields the same result, you only need to refer to the tab that matches your project environment.

TabUsesAccessing Interface MembersObject Release
CA C Project, or a C++ Project That Avoids Virtual Function CallsStove_IModuleAPIResult_IsSuccessful(result)Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)param)
C++A C++ project that uses the interface of api_module_types.h as-isresult->IsSuccessful()param->Destroy()

The SDK function (Stove_APIModule_*) is the same in both tabs. The only differences are in how interface members are accessed and how deallocation is indicated. The C++ mentioned here refers to calling the new interface using C++ syntax, which differs from the old C++ interface (Stove::PCSDK::<Module>) in PCSDK3.

Naming Rules

CategoryPatternExample
SDK FunctionsStove_APIModule_<Method>Stove_APIModule_Initialize, Stove_APIModule_GameCheckerForSteam
Parameter Object FactoryStove_APIModule_CreateParam(kind)Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_GameCheckerForSteamParam)
InterfaceIModule<Name>IModuleGameCheckerForSteamOutcome
Interface AccessorsStove_IModule<Name>_<Method>Stove_IModuleGameCheckerForSteamOutcome_GetAccessToken(outcome)
Callback TypeOnAPIModule<Action>CallbackOnAPIModuleGameCheckerForSteamCallback
Enumeration valuesk_E<Enum>_<Value>k_EStoveModuleCommonResultCode_Success

The termination function is Stove_APIModule_UnInitialize. Please note the uppercase I.

Memory Lifetime

All SDK objects have IModuleTypeBase as their root, and the ShouldDestroy() flag determines who is responsible for releasing them.

General Rule — You can determine this with the single line below without having to memorize the source.

c
if (Stove_IModuleTypeBase_ShouldDestroy(obj))   // In C++, obj->ShouldDestroy()
    Stove_IModuleTypeBase_Destroy(obj); // In C++, obj->Destroy()
Creation PathShouldDestroyRelease
Parameter object created using Stove_APIModule_CreateParam()trueThe caller must release the resource — After the API call is complete, Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)param)
The value returned by the synchronous function: IModuleAPIResult*trueThe caller must clean up — After checking the result code, Stove_IModuleTypeBase_Destroy()
The object received as an out parameter (IModuleStoveGDSInfo**)trueThe caller must release it
Callback arguments IModuleAPICallbackResult* and IModuleXxxOutcome*falseSDK Ownership — Do Not Release. It is destroyed the moment the callback returns.
Sub-objects obtained via the getter of the result object (GetMember(), GetUser(), etc.)falseOwned by parent object — Do not release

The object passed as a callback argument and its child objects become invalid as soon as the callback returns. If you need to use a value outside the callback, be sure to perform a deep copy of it inside the callback. Since strings are passed only as pointers (const wchar_t*), storing the pointer can result in a dangling pointer, which may cause a crash.

Ownership of parameter objects remains with the caller even after they are passed to the API. Even for asynchronous functions, you can release them immediately after the function returns. The SDK copies the necessary values at the time of the call.

Initialization Order

  1. Obtain a Steam session token from Steamworks (ISteamUser::GetAuthTicketForWebApi; the result is returned via the GetTicketForWebApiResponse_t callback). Since this is a value obtained once per process and reused throughout the game session, save the value you receive and use it as-is for subsequent calls.
  2. Use Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_APIInitializeParam) to create IModuleAPIInitializeParam, and configure the runtime environment, platform name (fixed as L"STEAM"), Steam App ID, and Steam User ID.
  3. Call Stove_APIModule_Initialize(param, onFinished, userData). Since it is asynchronous, the result is returned via a callback. Release the parameter object after the call.
  4. In the game's main loop, start calling Stove_APIModule_RunCallback() every frame. If you don't call this function, the three callbacks won't be triggered, and the integration won't proceed.
  5. After receiving the initialization success callback, it calls Stove_APIModule_GameCheckerForSteam. This is a single entry point that handles both login (authentication) and checking whether the game has been launched.
  6. The callback branches based on the result.
    1. Success — You are now ready to enter the game. Next, launch PCSDK3.
    2. 406401 (Terms of Service agreement required) — View the Terms of Service at Stove_APIModule_FetchGameTermsForSteam(), obtain consent on the developer's screen, submit via Stove_APIModule_AgreeToGameTermsForSteam(), and then call step 5 again.
    3. Other issues — The game closes after displaying the developer's information screen.
  7. It maintains the Stove_APIModule_RunCallback() loop while the game is running.
  8. Call Stove_APIModule_UnInitialize() when the game ends. This is a synchronous function, and the caller must free the returned IModuleAPIResult*.

The only case where the game entry check is called again is 406401. Once the terms of service agreement is reflected on the server, 406401 will no longer appear in subsequent calls.

Relationship with PCSDK3

If the game entry check is successful, APIModule directly passes the logged-in status to PCSDK3. There is no process where the developer retrieves the token and passes it to PCSDK3.

All the developer needs to do is launch PCSDK3 as usual after successfully passing the game entry check. From this point on, the behavior is the same as when the game is launched via the Stove Launcher.

Callback Execution Rules

  • All callbacks for asynchronous APIs use the __cdecl calling convention. In the header file, this convention is defined as the STOVE_MODULE_API macro in the callback typedef.
  • The callback runs on the thread that called Stove_APIModule_RunCallback(), not on an internal SDK thread. This function must be called from the game UI (main) thread. That way, you can interact directly with the game UI within the callback, and no additional synchronization is required.
  • If you don't call Stove_APIModule_RunCallback(), the callback will never be triggered. Make sure to run the loop before calling the asynchronous function.
  • The values IModuleAPICallbackResult* and IModuleXxxOutcome* received as callback arguments are valid only while the callback is executing. Do not call Destroy().
  • The callback does not directly receive void* userData. The value passed when the callback is invoked is retrieved via Stove_IModuleAPICallbackResult_GetUserData(callbackResult).
  • userData is a void* that is not managed by the SDK. If it points to a stack variable or a temporary object, it may become a dangling pointer at the time of the callback, which could cause a crash. If you are not using it, pass NULL instead.
  • If you pass NULL to onFinished, the request will be sent, but there is no way to receive the result. Always specify a callback.

Common Interface

This is a type shared by all APIs.

TypeContent
IModuleTypeBaseThis is the top-level interface for all SDK objects. It provides GetTypeKind(), ShouldDestroy(), Destroy(), and QueryExt().
IModuleAPIResultThis is the return value of the synchronous function. It returns GetSDKName() · GetMethodCode() · GetResultCode() · IsSuccessful().
IModuleAPICallbackResultThis is the first argument of the asynchronous callback. It takes GetResult(), GetErrorMsg(), GetExternalError(), and GetUserData().

The code returned by the server for each API (e.g., 406401 for the game entry check) is passed as GetExternalError(), not GetResultCode(). GetResultCode() contains the value EStoveModuleCommonResultCode (success 0, server response failure 1, HTTP failure 21, etc.). You need to look at both values together to accurately determine the cause of the failure.

Notes

  • You do not have to author every string on your notice screens. When the game entry check fails with a restriction (403201) or maintenance (503100), the outcome object carries the notice text; for terms agreement required (406401), call the terms lookup once more to receive the title and body. Display the values you receive as-is. Other failure codes carry no extra data, so you decide the text for those.
  • The supported platform is Steam. The platform name in the initialization parameters is a fixed value: L"STEAM".
  • Integrating the Steamworks SDK and issuing Steam session tokens are the developer's responsibility. This module does not include the Steamworks SDK.
  • Steam session tokens are issued once per process and reused throughout the game session. The same value is used for game entry verification, terms of service agreement, and re-invocation.
  • The login process does not vary depending on the account type (AccountType). There is no need to distinguish between account types during the game entry verification process.
  • The language setting (Stove_APIModule_SetLanguage) accepts BCP 47-format strings. Examples: L"ko", L"en", L"ja".
  • The child objects of the result object (GetRestrictInfo() · GetMaintenanceInfo()) are passed as empty objects when that is not the case. It is safer to include a null check before reading the values.

See Also

DocumentContent
Stove_APIModule_GameCheckerForSteamA single entry point that handles both login and game entry verification
IModuleGameCheckerForSteamOutcomeGame Entry Check Results Data
EStoveGameCheckerForSteamResultCodeGame Entry Check Results Code
Basic Integration Guide (C#)C# version with the same content

EStoveAgreeToGameTermsForSteamResultCode

Kind Result Code · Module APIModule · Version 1.0.0

Description

Stove_APIModule_AgreeToGameTermsForSteam is a specific result code. The value is taken directly from the response code returned by the Stove backend; 0 indicates success.

This value is extracted from the callback argument as Stove_IModuleAPICallbackResult_GetExternalError(). Stove_IModuleAPIResult_GetResultCode() does not contain this value, but rather the value specified in EStoveModuleCommonResultCode (success 0, server response failure 1, HTTP failure 21, etc.). You must examine both values together to accurately determine the cause of the failure.

The values are grouped into HTTP status code families. 4xxxxx indicates a request, authorization, or data issue, while 5xxxxx indicates a server issue. Only 49500 is an exception to this rule; it is a code used exclusively for blocking access.

The consent submission must succeed before you can call the game entry check again. If it fails, an informational screen will appear and the game will close. If you call the game entry check again without having obtained consent, it will fail again with error code 406401.

Declaration

c
typedef enum EStoveAgreeToGameTermsForSteamResultCode
{
    k_EStoveAgreeToGameTermsForSteamResultCode_Success = 0,

    k_EStoveAgreeToGameTermsForSteamResultCode_BlockedIP = 49500,
    k_EStoveAgreeToGameTermsForSteamResultCode_BadRequest = 400000,
    k_EStoveAgreeToGameTermsForSteamResultCode_InvalidProvider = 401000,
    k_EStoveAgreeToGameTermsForSteamResultCode_GameDataNotFound = 404000,
    k_EStoveAgreeToGameTermsForSteamResultCode_GameTermsNotFound = 404200,

    k_EStoveAgreeToGameTermsForSteamResultCode_ServerErr = 500000,
    k_EStoveAgreeToGameTermsForSteamResultCode_ServerErrCommunication = 500001,
    k_EStoveAgreeToGameTermsForSteamResultCode_ServerErrCircuitOpen = 500002,

    k_EStoveAgreeToGameTermsForSteamResultCode_Max = 0x7fffffff,
} EStoveAgreeToGameTermsForSteamResultCode;

Enum Values

CodeNameDescriptionShow to UserIn-Game Message
0k_EStoveAgreeToGameTermsForSteamResultCode_SuccessThe consent has been applied to the server. The game entry check is being called again.x
49500k_EStoveAgreeToGameTermsForSteamResultCode_BlockedIPThis IP address has been blocked.OAccess from this IP address is not permitted. Please contact customer service. Close Customer Service
400000k_EStoveAgreeToGameTermsForSteamResultCode_BadRequestThe request format is incorrect, or a required value is missing.OA temporary error has occurred. Please try again in a few moments. OK
401000k_EStoveAgreeToGameTermsForSteamResultCode_InvalidProviderThis authentication provider is not supported.OAccess from this IP address is not permitted. Please contact customer service. Close Customer Service
404000k_EStoveAgreeToGameTermsForSteamResultCode_GameDataNotFoundThe game data cannot be found.OWe were unable to retrieve the game information. Please try again. If the error persists, please check the Help section. Need more help? Close View Help
404200k_EStoveAgreeToGameTermsForSteamResultCode_GameTermsNotFoundWe cannot find the terms and conditions for this game.OWe were unable to retrieve the Terms of Service for this game. OK
500000k_EStoveAgreeToGameTermsForSteamResultCode_ServerErrThis is a server error.OWe're experiencing a temporary issue. Please try again. If the error persists after retrying, please check the help section. Need more help? Close View Help
500001k_EStoveAgreeToGameTermsForSteamResultCode_ServerErrCommunicationCommunication between servers failed.OA temporary error has occurred. Please try again in a moment. OK
500002k_EStoveAgreeToGameTermsForSteamResultCode_ServerErrCircuitOpenThe server is currently offline, so we are unable to process your request at this time.OA temporary error has occurred. Please try again in a moment. OK
0x7fffffffk_EStoveAgreeToGameTermsForSteamResultCode_MaxThese are enumeration boundary values. They are not used.

For all error codes, the game must display a notification screen and then exit. If the game entry check is called again before consent is granted, the game will return to the same point.

The code where Show to User is O is the code that instructs the game to display a screen informing the user of a situation. The screen and text are implemented by the developer.

Example

c
void __cdecl OnAgreeToGameTermsFinished(const IModuleAPICallbackResult* callbackResult,
                                        const IModuleAgreeToGameTermsForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        /* Consent reflected — Re-call the game entry check using the same Steam session token. */
        return;
    }

    switch (Stove_IModuleAPICallbackResult_GetExternalError(callbackResult))
    {
    case k_EStoveAgreeToGameTermsForSteamResultCode_BlockedIP:
    case k_EStoveAgreeToGameTermsForSteamResultCode_InvalidProvider:
        /* Display a "Connection Unavailable" message screen, then exit the game */
        break;

    case k_EStoveAgreeToGameTermsForSteamResultCode_ServerErr:
    case k_EStoveAgreeToGameTermsForSteamResultCode_ServerErrCommunication:
    case k_EStoveAgreeToGameTermsForSteamResultCode_ServerErrCircuitOpen:
        /* Display the server status notification screen, then exit the game */
        break;

    default:
        /* Display an error message screen, then exit the game */
        break;
    }
}

Notes

  • This code is assigned Stove_IModuleAPICallbackResult_GetExternalError(). Do not confuse it with Stove_IModuleAPIResult_GetResultCode().
  • The message provided by the server can be obtained using Stove_IModuleAPICallbackResult_GetErrorMsg().
  • When you call the game entry check again after successful consent, pass in the original Steam session token exactly as it was issued. The token is obtained once per process and reused throughout the game session.
  • A value not listed here may be returned as GetExternalError(). If the HTTP status code is not 200 but there is no code in the response body, the HTTP status code is passed as-is. Include a default branch in the switch statement.
  • Although they use the same numbers, the result codes differ by API due to variations in their value structures. The terms of service agreement does not include the game entry checks 403201, 404001, 406401, or 503100.

Changelog

VersionChange
1.0.0First Published

See Also


EStoveAPIModuleMethodCode

Kind Enum · Module APIModule · Version 1.0.0

Description

This value is read as Stove_IModuleAPIResult_GetMethodCode(). It indicates which function call produced this result.

This is used when you've created a structure that receives the results of multiple requests through a single callback, or when you want to log which call failed in the error log. It is not used to determine whether a result was successful or failed.

The prices are divided into two tiers. 1~6 covers basic functions such as initialization, termination, and configuration, while 80 and above cover business functions that form the workflow for Steam integration.

Declaration

c
typedef enum EStoveAPIModuleMethodCode
{
    k_EStoveAPIModuleMethodCode_Initialize = 1,
    // ... See the table of enumerated values below
    k_EStoveAPIModuleMethodCode_AgreeToGameTermsForSteam = 82,

    k_EStoveAPIModuleMethodCode_Max = 0x7fffffff
} EStoveAPIModuleMethodCode;

Enum Values

Basic Functions (1–6)

CodeNameDescription
1k_EStoveAPIModuleMethodCode_InitializeStove_APIModule_Initialize
2k_EStoveAPIModuleMethodCode_UnInitializeStove_APIModule_UnInitialize
3k_EStoveAPIModuleMethodCode_GetVersionStove_APIModule_GetVersion
4k_EStoveAPIModuleMethodCode_RunCallbackStove_APIModule_RunCallback
5k_EStoveAPIModuleMethodCode_SetLanguageStove_APIModule_SetLanguage
6k_EStoveAPIModuleMethodCode_GetGdsInfoStove_APIModule_GetGdsInfo
7 ~ 79Not in use (reserved section)

Job Functions (80 or more)

CodeNameDescription
80k_EStoveAPIModuleMethodCode_GameCheckerForSteamStove_APIModule_GameCheckerForSteam
81k_EStoveAPIModuleMethodCode_FetchGameTermsForSteamStove_APIModule_FetchGameTermsForSteam
82k_EStoveAPIModuleMethodCode_AgreeToGameTermsForSteamStove_APIModule_AgreeToGameTermsForSteam
83 ~ 0x7ffffffeNot in use (reserved section)
0x7fffffffk_EStoveAPIModuleMethodCode_MaxThese are enumeration boundary values. They are not used.

Example

c
void __cdecl OnGameCheckerFinished(const IModuleAPICallbackResult* callbackResult,
                                   const IModuleGameCheckerForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (Stove_IModuleAPIResult_GetMethodCode(apiResult)
        == k_EStoveAPIModuleMethodCode_GameCheckerForSteam)
    {
        // These are the results from the game entry check call. They are used for log tags and other purposes.
    }
}

Notes

  • Enumeration names use the same notation as the corresponding function names. For example, the uppercase I in UnInitialize(2) is consistent with Stove_APIModule_UnInitialize.
  • Even if the function call fails, the method code will still be executed. Please use Stove_IModuleAPIResult_IsSuccessful() to determine whether the call was successful.
  • The return type of Stove_IModuleAPIResult_GetMethodCode() is uint32_t. If you receive a type conversion warning when comparing it to an enumeration, cast it explicitly.
  • The number of the reservation segment is reserved for a new function to be added in the future. Please add a branch default to line switch.

Changelog

VersionChange
1.0.0First Published

See Also


EStoveAPIModuleTypeKind

Kind Enum · Module APIModule · Version 1.0.0

Description

This is a type identifier shared by all objects. It has two uses.

  • Pass a value greater than Stove_APIModule_CreateParam(kind) to specify which parameter object to create.
  • Read Stove_IModuleTypeBase_GetTypeKind(obj) to determine the type of the pointer held in the hand.

Values are divided into intervals. 0~499 is the data type of the result, and 500 or higher is the type of the parameter created and passed when the function is called.

Stove_APIModule_CreateParam() Only four parameter types actually create objects. If you pass a data type value, NULL is returned.

Declaration

c
typedef enum EStoveAPIModuleTypeKind
{
    k_EStoveAPIModuleTypeKind_Invalid = -1,

    k_EStoveAPIModuleTypeKind_Base = 0,
    // ... See the table of enumerated values below
    k_EStoveAPIModuleTypeKind_AgreeToGameTermsForSteamParam = 503,

    k_EStoveAPIModuleTypeKind_Max = 0x7fffffff,
} EStoveAPIModuleTypeKind;

Enum Values

Common Data Types (0–9)

CodeNameDescription
-1k_EStoveAPIModuleTypeKind_InvalidUnable to identify the type. This does not occur with normal objects.
0k_EStoveAPIModuleTypeKind_BaseIModuleTypeBase — The top-level interface for all objects
1k_EStoveAPIModuleTypeKind_APIResultIModuleAPIResult — Return value of a synchronous function
2k_EStoveAPIModuleTypeKind_APICallbackResultIModuleAPICallbackResult — The first argument of an asynchronous callback
3k_EStoveAPIModuleTypeKind_StoveGDSInfoIModuleStoveGDSInfo — Country, Regulations, Time Zone, and Language Information
4 ~ 9Not in use (reserved section)

Game Entry Check Data Types (10–19)

CodeNameDescription
10k_EStoveAPIModuleTypeKind_GameCheckerForSteamOutcomeIModuleGameCheckerForSteamOutcome — Game entry check results
11k_EStoveAPIModuleTypeKind_GameCheckerForSteamMemberIModuleGameCheckerForSteamMember — Stove Member Information
12k_EStoveAPIModuleTypeKind_GameCheckerForSteamUserIModuleGameCheckerForSteamUser — Game User Information
13k_EStoveAPIModuleTypeKind_GameCheckerForSteamGdsInfoIModuleGameCheckerForSteamGdsInfo — Region information provided along with the game entry check
14k_EStoveAPIModuleTypeKind_GameCheckerForSteamRestrictInfoIModuleGameCheckerForSteamRestrictInfo — Sanctions Information
15k_EStoveAPIModuleTypeKind_GameCheckerForSteamMaintenanceInfoIModuleGameCheckerForSteamMaintenanceInfo — Maintenance Information
16 ~ 19Not in use (reserved section)

Terms and Conditions Lookup Data Types (20–29)

CodeNameDescription
20k_EStoveAPIModuleTypeKind_FetchGameTermsForSteamOutcomeIModuleFetchGameTermsForSteamOutcome — Terms and Conditions Search Results
21k_EStoveAPIModuleTypeKind_FetchGameTermsForSteamContentIModuleFetchGameTermsForSteamContent — One term (a child object of the search results)
22 ~ 29Not in use (reserved section)
CodeNameDescription
30k_EStoveAPIModuleTypeKind_AgreeToGameTermsForSteamOutcomeIModuleAgreeToGameTermsForSteamOutcome — Terms and Conditions Acceptance Result
31 ~ 499Not in use (reserved section)

Parameter Types (500 or more)

This is a value that can be passed to Stove_APIModule_CreateParam().

CodeNameDescription
500k_EStoveAPIModuleTypeKind_APIInitializeParamIModuleAPIInitializeParam — Initialization parameter
501k_EStoveAPIModuleTypeKind_GameCheckerForSteamParamIModuleGameCheckerForSteamParamGame Entry Check parameter
502k_EStoveAPIModuleTypeKind_FetchGameTermsForSteamParamIModuleFetchGameTermsForSteamParam — Terms and Conditions Lookup Parameter
503k_EStoveAPIModuleTypeKind_AgreeToGameTermsForSteamParamIModuleAgreeToGameTermsForSteamParam — Terms of Service Agreement Parameter
504 ~ 0x7ffffffeNot in use (reserved section)
0x7fffffffk_EStoveAPIModuleTypeKind_MaxThese are enumeration boundary values. They are not used.

Example

c
IModuleGameCheckerForSteamParam* param = (IModuleGameCheckerForSteamParam*)
    Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_GameCheckerForSteamParam);

if (param == NULL)
{
    // This occurs when an unsupported value was passed or when creation failed.
    return;
}

// If necessary, you can review the type to verify it.
if (Stove_IModuleTypeBase_GetTypeKind((IModuleTypeBase*)param)
    == k_EStoveAPIModuleTypeKind_GameCheckerForSteamParam)
{
    // The expected type.
}

// Since this object was created by the caller, be sure to free it.
Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)param);

Notes

  • Stove_APIModule_CreateParam() only handles four parameter types (500 or higher). If any other values are passed, it returns NULL, so be sure to check the return value for null.
  • Objects created with Stove_APIModule_CreateParam() are owned by the caller. After passing them to the API, you must release them using Stove_IModuleTypeBase_Destroy().
  • The result object received via the callback and its child objects are owned by the SDK. It is acceptable to use GetTypeKind() to check the type, but you must not release it.
  • The return type of Stove_IModuleTypeBase_GetTypeKind() is int32_t. If you receive a type conversion warning when comparing it to an enumeration, cast it explicitly.
  • The number of the reservation section is a placeholder for a new type to be added in the future. Please place a default branch in the switch entry.

Changelog

VersionChange
1.0.0First Published

See Also


EStoveFetchGameTermsForSteamAgType

Kind Enum · Module APIModule · Version 1.0.0

Description

This value specifies which consent flow terms to accept when calling Stove_APIModule_FetchGameTermsForSteam. Set it as Stove_IModuleFetchGameTermsForSteamParam_SetAgType() in the request parameters.

We make this distinction because the terms of service for users joining Steam for the first time differ from those for users transferring their existing accounts.

If no value is specified, 0(Default) will be inserted. Even if you search for 0, the Steam Game Terms of Service will appear. Please insert 2 only when you need the terms of service for the account migration process.

Declaration

c
typedef enum EStoveFetchGameTermsForSteamAgType
{
    k_EStoveFetchGameTermsForSteamAgType_Default = 0,

    k_EStoveFetchGameTermsForSteamAgType_Steam = 1,
    k_EStoveFetchGameTermsForSteamAgType_Mig = 2,

    k_EStoveFetchGameTermsForSteamAgType_Max = 0x7fffffff,
} EStoveFetchGameTermsForSteamAgType;

Enum Values

CodeNameDescription
0k_EStoveFetchGameTermsForSteamAgType_DefaultNo separate query range is specified. This is the value included when the parameter object is created, and querying with this value causes the server to return the Steam Game Service Terms of Service.
1k_EStoveFetchGameTermsForSteamAgType_SteamView the terms of service for the flow that obtains consent directly on Steam
2k_EStoveFetchGameTermsForSteamAgType_MigView the terms and conditions for transferring an existing account
3 ~ 0x7ffffffeNot in use (reserved section)
0x7fffffffk_EStoveFetchGameTermsForSteamAgType_MaxThese are enumeration boundary values. They are not used.

Example

c
IModuleFetchGameTermsForSteamParam* param = (IModuleFetchGameTermsForSteamParam*)
    Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_FetchGameTermsForSteamParam);

Stove_IModuleFetchGameTermsForSteamParam_SetGameId(param, gameId);
Stove_IModuleFetchGameTermsForSteamParam_SetAgType(param, k_EStoveFetchGameTermsForSteamAgType_Steam);

Stove_APIModule_FetchGameTermsForSteam(param, OnFetchGameTermsFinished, NULL);

// Since this object was created by the caller, be sure to release it.
Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)param);

Notes

  • The default value is 0. When you create a parameter object, it contains 0; if you do not specify a value, this is used in the request as-is. Both 0 and 1 accept the Steam Game Services Terms of Service.
  • 1 and 2 refer to different sets of terms and conditions. You must enter the value that corresponds to the game's intended flow so that the correct terms and conditions are displayed to the user.
  • If the game access check fails due to 406401 (requires agreement to the terms of service), the standard procedure for obtaining consent is 1 (or 0 without a value). 2 is used only when transferring an existing account to Steam.
  • The parameter type of Stove_IModuleFetchGameTermsForSteamParam_SetAgType() is int32_t. You can pass enumeration values directly.
  • If you enter an undefined value, it will be treated as 0.

Changelog

VersionChange
1.0.0First Published

See Also


EStoveFetchGameTermsForSteamResultCode

Kind Result Code · Module APIModule · Version 1.0.0

Description

Stove_APIModule_FetchGameTermsForSteam is a specific result code. The value is taken directly from the response code returned by the Stove backend; 0 indicates success.

This value is extracted from the callback argument as Stove_IModuleAPICallbackResult_GetExternalError(). Stove_IModuleAPIResult_GetResultCode() does not contain this value, but rather the value from EStoveModuleCommonResultCode (success 0, server response failure 1, HTTP failure 21, etc.). You must examine both values together to accurately determine the cause of the failure.

The values are grouped by HTTP status code series. 4xxxxx indicates a request or data issue, while 5xxxxx indicates a server issue.

Viewing the Terms of Service is the first step in the process that occurs when the game entry check fails with error code 406401 (Terms of Service agreement required). If the Terms of Service check fails, there is no way to obtain consent, so the user cannot enter the game. A notification screen will appear, and the game will then close.

Declaration

c
typedef enum EStoveFetchGameTermsForSteamResultCode
{
    k_EStoveFetchGameTermsForSteamResultCode_Success = 0,

    k_EStoveFetchGameTermsForSteamResultCode_BadRequest = 400000,
    k_EStoveFetchGameTermsForSteamResultCode_GameDataNotFound = 404000,
    k_EStoveFetchGameTermsForSteamResultCode_GameTermsNotFound = 404200,

    k_EStoveFetchGameTermsForSteamResultCode_ServerErr = 500000,
    k_EStoveFetchGameTermsForSteamResultCode_ServerErrCommunication = 500001,

    k_EStoveFetchGameTermsForSteamResultCode_Max = 0x7fffffff,
} EStoveFetchGameTermsForSteamResultCode;

Enum Values

CodeNameDescriptionShow to UserIn-Game Message
0k_EStoveFetchGameTermsForSteamResultCode_SuccessThe list of terms was received. Continue to the developer's consent screen.x
400000k_EStoveFetchGameTermsForSteamResultCode_BadRequestThe request format is incorrect or a required value is missing.OA temporary error has occurred. Please try again in a moment. OK
404000k_EStoveFetchGameTermsForSteamResultCode_GameDataNotFoundThe game data cannot be found.OWe were unable to retrieve game information. Please try again. If the error persists, please check the Help section. Need more help? Close View Help
404200k_EStoveFetchGameTermsForSteamResultCode_GameTermsNotFoundWe cannot find the terms and conditions for this game.OWe were unable to retrieve the Terms of Service for this game. OK
500000k_EStoveFetchGameTermsForSteamResultCode_ServerErrThis is a server error.OWe're experiencing a temporary issue. Please try again. If the error persists after retrying, please check the help section. Need more help? Close View Help
500001k_EStoveFetchGameTermsForSteamResultCode_ServerErrCommunicationCommunication between servers failed.OA temporary error has occurred. Please try again in a moment. OK
0x7fffffffk_EStoveFetchGameTermsForSteamResultCode_MaxThese are enumeration boundary values. They are not used.

Any error code must display a notification screen and then exit the game. If the terms of service are not received, consent cannot be granted, and without consent, the game entry check will continue to fail with error code 406401.

The code where Show to User equals O is the code that instructs the game to display a screen informing the user of the situation. The screen and text are implemented by the developer.

Example

c
void __cdecl OnFetchGameTermsFinished(const IModuleAPICallbackResult* callbackResult,
                                      const IModuleFetchGameTermsForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        /* Fill in the list of terms and conditions on the developer consent screen. */
        return;
    }

    switch (Stove_IModuleAPICallbackResult_GetExternalError(callbackResult))
    {
    case k_EStoveFetchGameTermsForSteamResultCode_GameTermsNotFound:
    case k_EStoveFetchGameTermsForSteamResultCode_GameDataNotFound:
        /* Displays a message stating that the terms of service cannot be retrieved, then exits the game */
        break;

    case k_EStoveFetchGameTermsForSteamResultCode_ServerErr:
    case k_EStoveFetchGameTermsForSteamResultCode_ServerErrCommunication:
        /* Display the server status notification screen, then exit the game */
        break;

    default:
        /* Display an error message screen, then exit the game */
        break;
    }
}

Notes

  • This code is assigned Stove_IModuleAPICallbackResult_GetExternalError(). Do not confuse it with Stove_IModuleAPIResult_GetResultCode().
  • The message provided by the server can be obtained as Stove_IModuleAPICallbackResult_GetErrorMsg().
  • A value not listed here may appear as GetExternalError(). If the HTTP status code is not 200 but there is no code in the response body, the HTTP status code is passed as-is. Include a branch default in the switch statement.
  • Although they use the same number, there are separate result codes for each API with different value structures. For viewing the terms of service, the codes 49500, 401000, 403201, 404001, 406401, 503100, and 500002 are not available for checking the terms of service.
  • The scope of the terms and conditions to be retrieved is specified by the EStoveFetchGameTermsForSteamAgType parameter in the request.

Changelog

VersionChange
1.0.0First Published

See Also


EStoveGameCheckerForSteamResultCode

Kind Result Code · Module APIModule · Version 1.0.0

Description

Stove_APIModule_GameCheckerForSteam is a specific result code. The value is taken directly from the response code returned by the Stove backend; 0 indicates success.

This value is extracted from the callback argument as Stove_IModuleAPICallbackResult_GetExternalError(). Stove_IModuleAPIResult_GetResultCode() does not contain this value, but rather EStoveModuleCommonResultCode (success 0, server response failure 1, HTTP failure 21, etc.). You must examine both values together to accurately determine the cause of the failure.

The values are grouped by HTTP status code series. 4xxxxx indicates a request, authorization, or data issue, while 5xxxxx indicates a server issue. Only 49500 is an exception to this rule; it is a code used exclusively for blocking connections.

The only case where the game entry check is called again is 406401 (requires agreement to the terms and conditions). In all other cases of failure, a message screen is displayed, and the game is terminated.

Declaration

c
typedef enum EStoveGameCheckerForSteamResultCode
{
    k_EStoveGameCheckerForSteamResultCode_Success = 0,

    k_EStoveGameCheckerForSteamResultCode_BlockedIP = 49500,
    k_EStoveGameCheckerForSteamResultCode_BadRequest = 400000,
    k_EStoveGameCheckerForSteamResultCode_InvalidProvider = 401000,
    k_EStoveGameCheckerForSteamResultCode_GameRestrict = 403201,
    k_EStoveGameCheckerForSteamResultCode_GameDataNotFound = 404000,
    k_EStoveGameCheckerForSteamResultCode_InvalidGameClientKey = 404001,
    k_EStoveGameCheckerForSteamResultCode_GameTermsNotFound = 404200,
    k_EStoveGameCheckerForSteamResultCode_NotAgreeTerms = 406401,

    k_EStoveGameCheckerForSteamResultCode_ServerErr = 500000,
    k_EStoveGameCheckerForSteamResultCode_ServerErrCommunication = 500001,
    k_EStoveGameCheckerForSteamResultCode_ServerErrCircuitOpen = 500002,
    k_EStoveGameCheckerForSteamResultCode_GameServerMaintenance = 503100,

    k_EStoveGameCheckerForSteamResultCode_Max = 0x7fffffff,
} EStoveGameCheckerForSteamResultCode;

Enum Values

CodeNameDescriptionShow to UserIn-Game Message
0k_EStoveGameCheckerForSteamResultCode_SuccessYou can now enter the game. Next, launch PCSDK3.x
49500k_EStoveGameCheckerForSteamResultCode_BlockedIPThis IP address has been blocked.OAccess from this IP address is not permitted. Please contact customer service. Close Customer Service
400000k_EStoveGameCheckerForSteamResultCode_BadRequestThe request format is incorrect, or a required value is missing.OA temporary error has occurred. Please try again in a moment. OK
401000k_EStoveGameCheckerForSteamResultCode_InvalidProviderThis is an unsupported authentication provider.OAccess from this IP address is not permitted. Please contact customer service. Close Customer Service
403201k_EStoveGameCheckerForSteamResultCode_GameRestrictThis user has been banned from playing the game. The details of the ban are included in the ban information within the result object.O(The text is provided by the API)
404000k_EStoveGameCheckerForSteamResultCode_GameDataNotFoundThe game data cannot be found.OWe were unable to retrieve the game information. Please try again. If the error persists, please check the Help section. Need more help? Close View Help
404001k_EStoveGameCheckerForSteamResultCode_InvalidGameClientKeyThe game client key is incorrect. This is an issue with the game's registration information on the Stove platform, not a problem with the parameters passed by the game.OA temporary error has occurred. Please try again in a moment. OK
404200k_EStoveGameCheckerForSteamResultCode_GameTermsNotFoundWe cannot find the terms and conditions for this game.OWe were unable to retrieve the Terms of Service for this game. OK
406401k_EStoveGameCheckerForSteamResultCode_NotAgreeTermsThis user has not agreed to the mandatory game terms and conditions. Please complete the terms and conditions agreement process and then call the game entry check again.O(The text is provided by the API)
500000k_EStoveGameCheckerForSteamResultCode_ServerErrThis is a server error.OA temporary error has occurred. Please try again in a few moments. OK
500001k_EStoveGameCheckerForSteamResultCode_ServerErrCommunicationCommunication between servers failed.OA temporary error has occurred. Please try again in a few moments. OK
500002k_EStoveGameCheckerForSteamResultCode_ServerErrCircuitOpenThe server is currently offline, so we are temporarily unable to process your request.OA temporary error has occurred. Please try again in a moment. OK
503100k_EStoveGameCheckerForSteamResultCode_GameServerMaintenanceThe game server is currently undergoing maintenance. Details about the maintenance are included in the maintenance information of the result object.O(The text is provided by the API)
0x7fffffffk_EStoveGameCheckerForSteamResultCode_MaxThese are enumeration boundary values. They are not used.x

For all error codes except 406401, the game must be closed after the error message is displayed. Calling the game entry check again will yield the same result.

  • 403201 Sanctions: Displays the sanction information (sanction period, reason, and message) for the result object on the information screen.
  • 503100 The inspection displays the inspection details (inspection period, title, and body) of the result object on the information screen.

The code where Show to User equals O is used to display a screen that informs the user of a specific situation in the game. The screen and text are implemented by the developer. However, 403201, 503100, and 406401 are (provided by the API).

406401 is not an error notice but the terms agreement screen. Instead of closing the game after the notice, take the consent, submit it, and call the game entry check again.

Example

RequestGameTerms() in the example is not an SDK function; it is defined in the example of the Stove_APIModule_FetchGameTermsForSteam page.

c
void __cdecl OnGameCheckerFinished(const IModuleAPICallbackResult* callbackResult,
                                   const IModuleGameCheckerForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        /* Entering the Game — This leads to launching PCSDK3. */
        return;
    }

    switch (Stove_IModuleAPICallbackResult_GetExternalError(callbackResult))
    {
    case k_EStoveGameCheckerForSteamResultCode_NotAgreeTerms:
        /* This callback carries no terms body. Call the terms lookup to get the screen values. */
        /* Order: lookup -> developer consent screen -> submit consent -> game entry check again. */
        RequestGameTerms(g_GameId);   /* calls Stove_APIModule_FetchGameTermsForSteam() */
        break;

    case k_EStoveGameCheckerForSteamResultCode_GameRestrict:
        /* Display the sanctions notice screen using the sanctions information from the result object, then exit the game */
        break;

    case k_EStoveGameCheckerForSteamResultCode_GameServerMaintenance:
        /* Display the inspection guide screen using the inspection information from the result object, then exit the game */
        break;

    case k_EStoveGameCheckerForSteamResultCode_BlockedIP:
    case k_EStoveGameCheckerForSteamResultCode_InvalidProvider:
        /* Display a "Connection Unavailable" message screen, then exit the game */
        break;

    default:
        /* Display an error message screen, then exit the game */
        break;
    }
}

Notes

  • This code is assigned to Stove_IModuleAPICallbackResult_GetExternalError(). Do not confuse it with Stove_IModuleAPIResult_GetResultCode().
  • The message provided by the server can be retrieved using Stove_IModuleAPICallbackResult_GetErrorMsg().
  • Once your agreement to the terms and conditions is reflected on the server, 406401 will no longer appear in subsequent calls.
  • A value not listed here may appear as GetExternalError(). If the HTTP status code is not 200 but there is no code in the response body, the HTTP status code is passed as-is. Include a default branch in the switch statement.
  • Although they use the same number, there are separate result codes for each API with different value structures. Use EStoveFetchGameTermsForSteamResultCode to view the terms and conditions and EStoveAgreeToGameTermsForSteamResultCode to agree to them. 404001, 406401, and 503100 are used exclusively for game entry checks.

See Also


EStoveModuleCommonResultCode

Kind Result Code · Module APIModule · Version 1.0.0

Description

This is the return code used by all functions. A successful result is 0.

Where to Get the ValueMethod
Synchronous FunctionsReturned from IModuleAPIResult* to Stove_IModuleAPIResult_GetResultCode()
Asynchronous CallbackAfter removing IModuleAPIResult* from Stove_IModuleAPICallbackResult_GetResult(), follow the same procedure

If you're just looking at whether it works, using Stove_IModuleAPIResult_IsSuccessful() is simpler.

This enumeration does not include the API-specific codes returned by the server (such as 406401). The server code is returned separately as Stove_IModuleAPICallbackResult_GetExternalError(). To determine the cause of the failure, you must examine both values together.

The Relationship Between Result Code and API-Specific Code

SituationResult CodeGetExternalError()
Summit0 Success0
The HTTP status is 200, and the server response code is not 01 FailServer response codes (such as 406401)
The HTTP status code is not 20021 HttpErrorServer response code. If no code is included in the response body, the HTTP status code
Unable to parse the response body22 ResponseErrorHTTP Status Codes
No result value in the response body24 ResponseValueIsNullServer response code (may be 0)
The format of the result is different from what was expected25 ResponseInvalidValueFormatServer Response Codes
The call is invalid (e.g., called before initialization, missing parameters, etc.)2 · 10, etc.0

For a complete list of codes by API, please refer to the documentation for each API. Game Entry Check · View Terms and Conditions · Agreement to Terms and Conditions

Declaration

c
typedef enum EStoveModuleCommonResultCode
{
    k_EStoveModuleCommonResultCode_Success = 0,
    k_EStoveModuleCommonResultCode_Fail = 1,
    // ... See the table of enumerated values below
    k_EStoveModuleCommonResultCode_UnknownError = 255,

    k_EStoveModuleCommonResultCode_Max = 0x7fffffff
} EStoveModuleCommonResultCode;

Enum Values

The code where Show to User equals O is code that instructs the game to display a screen informing the user of a certain situation. The screen layout and text are determined by the developer. means that this code is not passed to the game callback, so there is no need to determine whether to display it.

General Results

CodeNameDescriptionShow to UserIn-Game Message
0k_EStoveModuleCommonResultCode_SuccessIt worked.x
1k_EStoveModuleCommonResultCode_FailThe server responded, but the request failed. The actual reason is stored in GetExternalError(), and that value is used to determine whether to display a message to the user.x

Call Condition Error

We need to fix the game's integration code. There is no need to notify users.

CodeNameDescriptionShow to UserIn-Game Message
2k_EStoveModuleCommonResultCode_InvalidParamThe parameter is invalid. The parameter object is NULL or a required value is empty.x
3k_EStoveModuleCommonResultCode_AlreadySetToAnotherModeThe device is already set to a different mode and cannot process this request.x
4 ~ 9Not in use (reserved section)
10k_EStoveModuleCommonResultCode_NotInitializedThis was called before initialization. Stove_APIModule_Initialize() Please call this after receiving the success callback.x
11k_EStoveModuleCommonResultCode_AlreadyInitializedIt is already initialized.x
12 ~ 20Not in use (reserved section)

Communication and Response Errors

CodeNameDescriptionShow to UserIn-Game Message
21k_EStoveModuleCommonResultCode_HttpErrorThe HTTP status code is not 200. If the server returns a code, that value is stored in GetExternalError(); otherwise, the HTTP status code is stored there.OThere was a temporary issue. Please try again. OK
22k_EStoveModuleCommonResultCode_ResponseErrorThe response text cannot be parsed. This may be due to a formatting error or a missing required field.OA temporary issue has occurred. Please try again. OK
23k_EStoveModuleCommonResultCode_ResponseInvalidCodeThe response code is invalid. It is not configured in the current implementation.
24k_EStoveModuleCommonResultCode_ResponseValueIsNullThere is no result value in the response body. This code is returned when a value is missing from a successful response for the game entry check, and when a value is missing for the terms and conditions lookup or agreement, regardless of the reason for failure.OWe are currently experiencing a temporary issue. Please try again. If the error persists, please contact customer service. Close Customer Service
25k_EStoveModuleCommonResultCode_ResponseInvalidValueFormatThe format of the result value in the response body is different from what is expected. This error is returned when the list of terms and conditions is not returned as an array in a terms and conditions query.OWe are currently experiencing a temporary issue. Please try again. If the error persists, please contact our customer service center. Close Customer Service
26 ~ 249Not in use (reserved section)

System and Runtime Errors

CodeNameDescriptionShow to UserIn-Game Message
250k_EStoveModuleCommonResultCode_JsonExceptionAn exception occurred while processing JSON. It is not configured in the function paths provided by the game.
251k_EStoveModuleCommonResultCode_PCSDKDllNotFoundThe required DLL cannot be found. Please check to make sure no files are missing from the deployment configuration.OThe files required to run the game cannot be found. Please reinstall the game or contact customer support. Close Customer Service
252k_EStoveModuleCommonResultCode_NotImplementedThis feature has not been implemented. It is not configured in the function paths provided by the game.
253k_EStoveModuleCommonResultCode_UnmanagedExceptionAn unidentified exception has occurred. There is no cause string.OA temporary issue has occurred. Please try again. OK
254k_EStoveModuleCommonResultCode_ManagedExceptionA formatted exception has occurred. The cause string is included in GetErrorMsg().OA temporary issue has occurred. Please try again. OK
255k_EStoveModuleCommonResultCode_UnknownErrorAn unknown error has occurred. This is not configured in the current implementation.
256 ~ 0x7ffffffeNot in use (reserved section)
0x7fffffffk_EStoveModuleCommonResultCode_MaxThese are enumeration boundary values. They are not used.

253 and 254 are classified by exception type. 254 is a formatted exception, so it comes with a cause string, while 253 is an exception where the type cannot be specified, so it has no cause string. The screen displayed to the user can be the same, but please distinguish between the two codes in the log. This helps narrow down the cause when inquiries are made.

Example

c
void __cdecl OnGameCheckerFinished(const IModuleAPICallbackResult* callbackResult,
                                   const IModuleGameCheckerForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        // Please implement the logic for a successful outcome.
        return;
    }

    switch (Stove_IModuleAPIResult_GetResultCode(apiResult))
    {
    case k_EStoveModuleCommonResultCode_Fail:
        // This is a case where the server returned an error. The code branches based on the value returned by GetExternalError().
        break;

    case k_EStoveModuleCommonResultCode_HttpError:
    case k_EStoveModuleCommonResultCode_ResponseError:
        // Displays a screen showing the network or server status.
        break;

    case k_EStoveModuleCommonResultCode_UnmanagedException:
    case k_EStoveModuleCommonResultCode_ManagedException:
        // Displays a temporary error message screen.
        break;

    default:
        // Please implement other error-handling mechanisms.
        break;
    }
}

Notes

  • The error codes returned by the server for each API are passed as Stove_IModuleAPICallbackResult_GetExternalError(), not as this enumeration. If you make decisions based solely on the error code, you won't be able to identify the cause of the failure.
  • 1(Fail) and 21(HttpError) both contain server code in GetExternalError(). Even if the resulting code is different, you must not proceed without checking the server code.
  • The message provided by the server can be obtained as Stove_IModuleAPICallbackResult_GetErrorMsg(). Since this string becomes invalid once the callback returns, be sure to copy it if needed.
  • 24(ResponseValueIsNull) and 25(ResponseInvalidValueFormat) are displayed when the server response does not conform to the specifications. Since this is not an issue that can be resolved by the game, we respond by displaying an information screen; please contact us if the issue occurs again.
  • In the "View Terms and Conditions" and "Agree to Terms and Conditions" sections, 24 takes precedence over 1 (Fail). If the server returns a failure code without sending a result value, the result code is overwritten by 24, and the actual reason remains only in GetExternalError(). Therefore, you must always check GetExternalError() first to determine the cause of the failure.
  • If you pass NULL to onFinished, it will be treated as a parameter error, but since there is no callback to receive the result, nothing will be observed in the game. Always specify a callback.
  • The return type of Stove_IModuleAPIResult_GetResultCode() is uint32_t. If you receive a type conversion warning when comparing it to an enumeration, cast it explicitly.

Changelog

VersionChange
1.0.0First Published

See Also


IModuleAgreeToGameTermsForSteamOutcome

Kind Struct · Module APIModule · Version 1.0.0

Description

This is the result data passed as the second argument to the Stove_APIModule_AgreeToGameTermsForSteam callback. It contains a single consent identifier (GUID) issued by the server.

A consent ID is a value issued by the server to distinguish between consent processing results. The module does not interpret this value; it simply passes it along as-is. The game does not need to use this value directly, but it is helpful to log it in case troubleshooting is required.

This is the data type that the SDK populates and passes via a callback. The caller does not create it directly.

This object belongs to the SDK and becomes invalid as soon as the callback returns. Do not call Destroy(); if you want to retain the value, copy it within the callback.

Declaration

c
typedef struct IModuleAgreeToGameTermsForSteamOutcome IModuleAgreeToGameTermsForSteamOutcome;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
Guidconst wchar_t*ReadStove_IModuleAgreeToGameTermsForSteamOutcome_GetGuid()This is the consent identifier issued by the server. It is the same value as UserId (game user identifier) in the game entry check results, and the module does not interpret this value.

Memory Management

ItemValue
Creating EntitySDK
Responsibility for DismantlingSDK (Do Not Unlock — Invalidated When Callback Returns)
StringThe returned const wchar_t* is this object's internal buffer. To save it, you must copy it within the callback.

Example

c
void __cdecl OnAgreeToGameTermsFinished(const IModuleAPICallbackResult* callbackResult,
                                        const IModuleAgreeToGameTermsForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        const wchar_t* guid =
            Stove_IModuleAgreeToGameTermsForSteamOutcome_GetGuid(result);
        (void)guid; /* I'll make a note of it. */

        /* Since the consent has been reflected, the game entry check is called again. */
    }
    else
    {
        /* Please implement the logic for when an error occurs. */
    }

    /* `result` does not call `Destroy()`. */
}

Notes

  • If the consent submission is successful, the game entry check (Stove_APIModule_GameCheckerForSteam) is called again. At this point, the Steam session token retains the same value.
  • If the operation fails, this object will not be populated with a value. Check whether the operation succeeded first.
  • Success is determined not by this object, but by the result of the first argument passed to the callback. The reason for failure is identified as Stove_IModuleAPICallbackResult_GetExternalError().

See Also


IModuleAgreeToGameTermsForSteamParam

Kind Struct · Module APIModule · Version 1.0.0

Description

Contains the parameters required for the Stove_APIModule_AgreeToGameTermsForSteam call. Sets the game ID and Steam session token.

Set it to Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_AgreeToGameTermsForSteamParam), fill in the value, call the function, and when the function returns, release it as Destroy().

The developer is responsible for implementing the process of displaying the terms and conditions screen to the user and obtaining their consent. This API is only responsible for submitting the consent status to the server.

For the Steam session token, enter the exact value used for the game entry check. Since this value is issued once per process and reused throughout the game session, do not request a new one for this call.

Declaration

c
typedef struct IModuleAgreeToGameTermsForSteamParam IModuleAgreeToGameTermsForSteamParam;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
GameIdconst wchar_t*Reading and WritingStove_IModuleAgreeToGameTermsForSteamParam_GetGameId() / SetGameId()This is a unique ID issued when you register a game on the Stove platform.
SteamSessionTokenconst wchar_t*Reading and WritingStove_IModuleAgreeToGameTermsForSteamParam_GetSteamSessionToken() / SetSteamSessionToken()This is a session token issued via Steamworks ISteamUser::GetAuthTicketForWebApi. Enter the same value used for the game entry check.

Memory Management

ItemValue
Creating EntityCaller (Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_AgreeToGameTermsForSteamParam))
Responsibility for DismantlingCaller (Destroy() required) — Releases the resource after the terms-of-service agreement function returns.
String OwnershipThe string passed to Set...() is stored in a copy of the parameter object. The buffer on the caller's side can be freed immediately.

Example

c
IModuleAgreeToGameTermsForSteamParam* param =
    (IModuleAgreeToGameTermsForSteamParam*)Stove_APIModule_CreateParam(
        k_EStoveAPIModuleTypeKind_AgreeToGameTermsForSteamParam);

Stove_IModuleAgreeToGameTermsForSteamParam_SetGameId(param, L"YOUR_GAME_ID");
Stove_IModuleAgreeToGameTermsForSteamParam_SetSteamSessionToken(param, steamSessionToken);

Stove_APIModule_AgreeToGameTermsForSteam(param, OnAgreeToGameTermsFinished, NULL);

Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)param);

Notes

  • Do not include which terms and conditions you agreed to in the parameter. Your consent will be treated as covering all the terms and conditions you viewed.
  • If the consent submission is successful, the game entry check is called again. The same Steam session token is used at this time as well.
  • If you call this before initialization is complete, it will fail with error k_EStoveModuleCommonResultCode_NotInitialized(10).

See Also


IModuleAPICallbackResult

Kind Struct · Module APIModule · Version 1.0.0

Description

This is the result passed as the first argument to the callback of all asynchronous APIs. It wraps IModuleAPIResult and contains the error message, the response code returned by the server, and the userData pointer passed at the time of the call.

You can only determine the cause of the failure by looking at both values together. GetResult()'s ResultCode contains the common error code, while GetExternalError() contains the specific API error code returned by the server.

SituationResultCodeExternalError
Success0 (Success)0
The HTTP status is 200, but the server response code is not 01 (Fail)Code returned by the server (e.g., 406401)
Not HTTP 20021 (HttpError)Code returned by the server

If you branch based solely on GetResultCode(), you won't be able to distinguish between "Non-acceptance of Terms" (406401), "Sanctions" (403201), and "Inspection" (503100). Please use the GetExternalError() value for screen branching.

This object and the result object obtained from GetResult() are owned by the SDK. Do not call Destroy(); instead, copy any values you need to keep within the callback.

Declaration

c
typedef struct IModuleAPICallbackResult IModuleAPICallbackResult;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
ResultIModuleAPIResult*ReadStove_IModuleAPICallbackResult_GetResult()This is an internal result object. It contains common result code and method code. It is valid only during the callback.
ErrorMsgconst wchar_t*ReadStove_IModuleAPICallbackResult_GetErrorMsg()This is a message explaining the reason for the failure. It's a value intended for logging and is not meant to be displayed to the user as-is.
ExternalErrorint32_tReadStove_IModuleAPICallbackResult_GetExternalError()These are the result codes for each API returned by the server. For example, 406401, 403201, and 503100 for the game entry check are returned with these values.
UserDatavoid*ReadStove_IModuleAPICallbackResult_GetUserData()This is the userData pointer passed when calling the asynchronous API. The SDK simply passes the value as-is.

Memory Management

ItemValue
Creating EntitySDK
Responsibility for DismantlingSDK (Do not unwrap — becomes invalid once the callback returns)
The return value of GetResult()This object owns it. It is not released separately.
StringThe const wchar_t* returned is this object's internal buffer. You must copy it if you want to save it.
UserDataThis is a pointer that isn't managed by the SDK. The party that passed it is responsible for its lifetime.

Example

c
void __cdecl OnGameCheckerFinished(const IModuleAPICallbackResult* callbackResult,
                                   const IModuleGameCheckerForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        /* Please implement the logic for the success case. */
        return;
    }

    /* Common Result Codes — Determines whether the communication itself failed. */
    uint32_t resultCode = Stove_IModuleAPIResult_GetResultCode(apiResult);

    /* Code provided by the server — Use this value for screen branching. */
    int32_t externalError = Stove_IModuleAPICallbackResult_GetExternalError(callbackResult);

    if (externalError == k_EStoveGameCheckerForSteamResultCode_NotAgreeTerms)
    {
        /* You will be redirected to the Terms and Conditions agreement screen. */
    }
    else if (resultCode == k_EStoveModuleCommonResultCode_HttpError)
    {
        /* A communication failure message will be displayed. */
    }
    else
    {
        const wchar_t* errorMsg = Stove_IModuleAPICallbackResult_GetErrorMsg(callbackResult);
        (void)errorMsg; /* I'm logging this. */
    }

    /* `callbackResult`, `apiResult`, and `result` do not call `Destroy()`. */
}

Notes

  • The callback runs on the thread that called Stove_APIModule_RunCallback(), not on an internal SDK thread. This function is called from the game UI (main) thread.
  • userData is not passed directly as a callback argument. It is retrieved via Stove_IModuleAPICallbackResult_GetUserData().
  • If you pass a stack variable or a temporary object via userData, it will have already been destroyed by the time the callback is executed, resulting in a dangling pointer that can cause a crash. If you don't use it, pass NULL instead.
  • The meaning of the value ExternalError varies by API. For game access checks, see EStoveGameCheckerForSteamResultCode; for viewing the terms of service, see EStoveFetchGameTermsForSteamResultCode; and for agreeing to the terms of service, see EStoveAgreeToGameTermsForSteamResultCode.
  • If the operation is successful, ExternalError is 0. Check the value only if the operation fails.

See Also


IModuleAPIInitializeParam

Kind Struct · Module APIModule · Version 1.0.0

Description

Contains the parameters required for the Stove_APIModule_Initialize call. Set the execution environment, platform name, Steam app ID, and Steam user ID.

Create it as Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_APIInitializeParam), fill in the value, pass it to the initialization function, and when the function returns, release it as Destroy(). Although this is an asynchronous function, the SDK copies the value at the time of the call, so you can release it immediately without having to wait for the callback.

The platform name is fixed as L"STEAM". This is because the only supported external platform is Steam.

Declaration

c
typedef struct IModuleAPIInitializeParam IModuleAPIInitializeParam;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
Environmentconst wchar_t*Reading and WritingStove_IModuleAPIInitializeParam_GetEnvironment() / SetEnvironment()This is the server environment you will be connecting to. Enter L"live" for production and L"sandbox" for development and testing. If you do not enter the specified values, initialization will fail (see the note below).
PlatformNameconst wchar_t*Reading and WritingStove_IModuleAPIInitializeParam_GetPlatformName() / SetPlatformName()This is the name of an external platform. L"STEAM" is a constant value.
SteamAppIdconst wchar_t*Reading and WritingStove_IModuleAPIInitializeParam_GetSteamAppId() / SetSteamAppId()This is the app ID registered on Steam. Enter it as a string.
SteamUserIdconst wchar_t*Reading and WritingStove_IModuleAPIInitializeParam_GetSteamUserId() / SetSteamUserId()This is the Steam user ID (SteamID64). Enter the value obtained from Steamworks as a string.

Environment If you enter a string other than L"live" · L"sandbox", initialization will fail with error 2(InvalidParam). The same applies to an empty string. Please be especially careful with the following two cases.

  • Spaces before or after the value are not allowed. If there are spaces, such as in L"LIVE ", the command will fail.
  • It is not case-sensitive. L"LIVE", L"Live", and L"live" all function the same way.

If the operation fails, you can check which value was incorrect by looking at the Stove_IModuleAPICallbackResult_GetErrorMsg() message in the callback.

Memory Management

ItemValue
Creating EntityCaller (Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_APIInitializeParam))
Responsibility for ReleaseCaller (Destroy() required) — Deallocates the resource after the initialization function returns
String OwnershipThe string passed to Set...() is stored in a copy of the parameter object. The buffer on the caller's side can be freed immediately.

Example

c
IModuleAPIInitializeParam* param =
    (IModuleAPIInitializeParam*)Stove_APIModule_CreateParam(
        k_EStoveAPIModuleTypeKind_APIInitializeParam);

Stove_IModuleAPIInitializeParam_SetEnvironment(param, L"live");
Stove_IModuleAPIInitializeParam_SetPlatformName(param, L"STEAM");
Stove_IModuleAPIInitializeParam_SetSteamAppId(param, L"YOUR_STEAM_APP_ID");
Stove_IModuleAPIInitializeParam_SetSteamUserId(param, steamUserId);

Stove_APIModule_Initialize(param, OnInitializeFinished, NULL);

/* Although it is an asynchronous function, you can release the parameters immediately. */
Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)param);

Notes

  • The game ID is not included in this parameter. Enter it in the "Game Entry Check," "Terms and Conditions View," and "Terms and Conditions Agreement" parameters, respectively.
  • The Steam session token is also not included in this parameter. The session token is issued once per process, and the same value is used for both the game entry check and the terms of service agreement parameter.
  • Initialization is asynchronous. To receive the callback, you must be running Stove_APIModule_RunCallback() in the game loop.
  • If you call it again when it has already been initialized, it will fail with error k_EStoveModuleCommonResultCode_AlreadyInitialized(11).

See Also


IModuleAPIResult

Kind Struct · Module APIModule · Version 1.0.0

Description

This is the result of calling a synchronous function. It contains the name of the function that generated the result (MethodCode) and the result code (ResultCode).

Functions that operate synchronously, such as Stove_APIModule_UnInitialize(), Stove_APIModule_SetLanguage(), Stove_APIModule_GetGdsInfo(), and Stove_APIModule_GetVersion(), return this object. Objects received through this path must be released by the caller.

In an asynchronous callback, you receive an object of the same type as IModuleAPICallbackResult in GetResult(). In this case, since the SDK owns it, you do not need to release it.

ResultCode contains the value EStoveModuleCommonResultCode (success 0, failure 1, HTTP failure 21, etc.). The API-specific code returned by the server (e.g., 406401) is not this value but is passed as GetExternalError() in the callback result.

Declaration

c
typedef struct IModuleAPIResult IModuleAPIResult;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
SDKNameconst wchar_t*ReadStove_IModuleAPIResult_GetSDKName()This is the name of the module that generated the result. It is the value used when logging.
MethodCodeuint32_tReadStove_IModuleAPIResult_GetMethodCode()This code indicates which function generated the result. It corresponds to the value EStoveAPIModuleMethodCode.
ResultCodeuint32_tReadStove_IModuleAPIResult_GetResultCode()Here is the result code. The value is EStoveModuleCommonResultCode, and a success is 0.
IsSuccessfulboolReadStove_IModuleAPIResult_IsSuccessful()Whether it succeeds or not. If ResultCode is 0, then it is true.

Memory Management

ItemValue
Creating EntitySDK
Responsibility for DismantlingIt depends on the return path.
Return Value of a Synchronous FunctionThe caller must release the resource — After checking the result code, Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)result)
GetResult() in the callback resultSDK Ownership — Do Not Release. Becomes invalid once the callback returns.
StringThe returned const wchar_t* is an internal object buffer. You must copy it to save it.

Example

c
/* Synchronous function — The caller releases the returned result object. */
IModuleAPIResult* result = Stove_APIModule_SetLanguage(L"ko");

if (Stove_IModuleAPIResult_IsSuccessful(result))
{
    /* Please implement the logic for a successful outcome. */
}
else
{
    uint32_t resultCode = Stove_IModuleAPIResult_GetResultCode(result);
    uint32_t methodCode = Stove_IModuleAPIResult_GetMethodCode(result);
    (void)resultCode;
    (void)methodCode;
    /* Please implement the logic for when an error occurs. */
}

Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)result);

Notes

  • IsSuccessful() has the same meaning as ResultCode == 0. If you're only looking at whether it succeeded or failed, IsSuccessful() is easier to read.
  • To accurately determine the cause of the failure, you need to examine both ResultCode and GetExternalError() in the callback path. ResultCode alone is not enough to identify the reason provided by the server.
  • MethodCode is used to distinguish between the results of different API calls when logging them in a single location.
  • If you do not deallocate the return value of a synchronous function, memory leaks will occur. You must deallocate it even if you only check the result code and then discard it.

See Also


IModuleFetchGameTermsForSteamContent

Kind Struct · Module APIModule · Version 1.0.0

Description

This is a single set of terms and conditions generated from IModuleFetchGameTermsForSteamOutcome to GetContentAt(index). It includes the title and body text to be displayed on the screen, the effective date, and the consent type.

The consent type (AgreeType) is the classification the server assigns to each terms item. FIRST_MUST refers to terms that require first-time consent (Steam Game Service Terms of Use), while NONE marks an item outside that classification. Decide by this value, never by the array position.

Present every item you received on one screen. Instead of a checkbox per item, place a single combined consent checkbox at the bottom of the screen. Consent is not split by type.

The values map to the screen as follows: Title is the terms title, Text is the terms body, EnforcedDt is the effective date, and AgreeType is the consent type. The screen title, the button and checkbox labels, and the date format are decided by the developer.

The terms body (Text) is delivered as HTML.

The value entered in STOVE Partners is relayed as-is, so it contains HTML by default. If your game UI cannot display HTML as-is, plain text can be provided instead — please contact technical support.

This object is owned by the parent result object. Do not call Destroy(); instead, copy the string to be displayed within the callback.

Declaration

c
typedef struct IModuleFetchGameTermsForSteamContent IModuleFetchGameTermsForSteamContent;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
Titleconst wchar_t*ReadStove_IModuleFetchGameTermsForSteamContent_GetTitle()This is the title of the terms and conditions.
Textconst wchar_t*ReadStove_IModuleFetchGameTermsForSteamContent_GetText()This is the text of the terms and conditions.
EnforcedDtint64_tReadStove_IModuleFetchGameTermsForSteamContent_GetEnforcedDt()This is the effective date of the terms and conditions. It is the Unix epoch in milliseconds.
AgreeTypeconst wchar_t*ReadStove_IModuleFetchGameTermsForSteamContent_GetAgreeType()These are types of consent. FIRST_MUST refers to terms that require first-time consent. Consent is not split by type.

Memory Management

ItemValue
Creating EntitySDK
Responsibility for TerminationSDK (Do Not Release) — Owned by the parent result object; it is invalidated when the callback returns.
StringThe value const wchar_t* returned is an internal buffer. To save it, you must copy it within the callback.

Example

AddRequiredTermsSection() · AddNoticeTermsSection() in the example are placeholder functions that the SDK does not provide. They belong to your game UI, so implement them yourself.

c
/* Copying one terms item into a screen model. */
typedef struct GameTermsItem
{
    wchar_t* Title;         /* terms title */
    wchar_t* Text;          /* terms body */
    int64_t  EnforcedDt;    /* effective date (epoch milliseconds) */
    int      MustAgree;     /* mandatory or not */
} GameTermsItem;

static int CopyTermsItem(const IModuleFetchGameTermsForSteamContent* content,
                         GameTermsItem* item)
{
    const wchar_t* title;
    const wchar_t* text;
    const wchar_t* agreeType;

    if (content == NULL || item == NULL)
    {
        return 0;
    }

    title     = Stove_IModuleFetchGameTermsForSteamContent_GetTitle(content);
    text      = Stove_IModuleFetchGameTermsForSteamContent_GetText(content);
    agreeType = Stove_IModuleFetchGameTermsForSteamContent_GetAgreeType(content);

    /* AgreeType is a string, not an enumeration. Never decide by array position. */
    item->MustAgree = (agreeType != NULL && wcscmp(agreeType, L"FIRST_MUST") == 0);

    /* The pointers go invalid once the callback returns, so copy them here. */
    item->Title      = _wcsdup(title != NULL ? title : L"");
    item->Text       = _wcsdup(text != NULL ? text : L"");
    item->EnforcedDt = Stove_IModuleFetchGameTermsForSteamContent_GetEnforcedDt(content);

    return 1;
}

static void ReadTerms(const IModuleFetchGameTermsForSteamOutcome* result)
{
    uint32_t contentCount =
        Stove_IModuleFetchGameTermsForSteamOutcome_GetContentCount(result);

    for (uint32_t i = 0; i < contentCount; ++i)
    {
        const IModuleFetchGameTermsForSteamContent* content =
            Stove_IModuleFetchGameTermsForSteamOutcome_GetContentAt(result, i);

        GameTermsItem item;
        if (CopyTermsItem(content, &item) == 0)
        {
            continue;
        }

        if (item.MustAgree)
        {
            /* Terms that require first-time consent. Mark them as required on screen. */
            AddRequiredTermsSection(&item);
        }
        else
        {
            /* Any other item. It also requires consent, so show it as well. */
            AddNoticeTermsSection(&item);
        }
    }

    /* Never call Destroy() on content. */
}

Notes

  • This object cannot be obtained on its own. It can only be accessed as GetContentAt(index) of the parent result object.
  • AgreeType is a string, not an enumeration. When comparing, treat it as a string.
  • The body is delivered as HTML. It is relayed exactly as entered in STOVE Partners, and neither the SDK nor the server transforms it.
  • The body is long, so place it in a scrollable area. Never truncate or summarize it.
  • If displaying HTML as-is is not feasible for your UI, plain text can be provided instead — please contact technical support.
  • EnforcedDt is a Unix epoch value in milliseconds. When passing it to an API that uses seconds, divide it by 1000. The game handles the display format conversion.

See Also


IModuleFetchGameTermsForSteamOutcome

Kind Struct · Module APIModule · Version 1.0.0

Description

This is the result data passed as the second argument to the Stove_APIModule_FetchGameTermsForSteam callback. It contains the list of terms and conditions to be displayed to the user.

There may be multiple records. Instead of using an array pointer, we read them using the count and index accessors. We use GetContentCount() to get the count and GetContentAt(index) to retrieve them one by one.

This is a data type that the SDK populates and passes via a callback. The caller does not create it directly.

This object and the items obtained via GetContentAt() are owned by the SDK and become invalid the moment the callback returns. Do not call Destroy(); instead, perform a deep copy of the title and body to be displayed on the screen within the callback.

Declaration

c
typedef struct IModuleFetchGameTermsForSteamOutcome IModuleFetchGameTermsForSteamOutcome;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
ContentCountuint32_tReadStove_IModuleFetchGameTermsForSteamOutcome_GetContentCount()The number of terms and conditions. If none exist, the value is 0.
ContentAt(index)const IModuleFetchGameTermsForSteamContent*ReadStove_IModuleFetchGameTermsForSteamOutcome_GetContentAt()This is the terms and conditions entry at position index (starting from 0). If there are index or more entries, it returns NULL.

Memory Management

ItemValue
Creating EntitySDK
Responsibility for DismantlingSDK (Do not release—invalidated when the callback returns)
Terms and Conditions SectionThis object owns it. The pointer obtained via GetContentAt() is also not released.
StringThe item's title and body are internal buffer pointers. To display them on the screen, you must copy them within the callback.

Example

ShowGameTermsUI() in the example is a placeholder function that the SDK does not provide. It belongs to your game UI, so implement it yourself.

c
/* Model handed to the terms screen. Fill one entry per returned item. */
typedef struct GameTermsItem
{
    wchar_t* Title;         /* terms title */
    wchar_t* Text;          /* terms body */
    int64_t  EnforcedDt;    /* effective date (epoch milliseconds) */
    int      MustAgree;     /* mandatory or not */
} GameTermsItem;

#define MAX_GAME_TERMS 16
static GameTermsItem g_Terms[MAX_GAME_TERMS];
static uint32_t      g_TermsCount = 0;

void __cdecl OnFetchGameTermsFinished(const IModuleAPICallbackResult* callbackResult,
                                      const IModuleFetchGameTermsForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (!Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        /* Implement your failure handling here. */
        return;
    }

    uint32_t contentCount =
        Stove_IModuleFetchGameTermsForSteamOutcome_GetContentCount(result);

    if (contentCount == 0)
    {
        /* Nothing to display. Do not open the consent screen. */
        return;
    }

    g_TermsCount = 0;

    for (uint32_t i = 0; i < contentCount && g_TermsCount < MAX_GAME_TERMS; ++i)
    {
        const IModuleFetchGameTermsForSteamContent* content =
            Stove_IModuleFetchGameTermsForSteamOutcome_GetContentAt(result, i);
        if (content == NULL)
        {
            continue;
        }

        const wchar_t* title =
            Stove_IModuleFetchGameTermsForSteamContent_GetTitle(content);
        const wchar_t* text =
            Stove_IModuleFetchGameTermsForSteamContent_GetText(content);
        const wchar_t* agreeType =
            Stove_IModuleFetchGameTermsForSteamContent_GetAgreeType(content);

        /* The pointers above go invalid once the callback returns, so copy them here. */
        GameTermsItem* item = &g_Terms[g_TermsCount++];
        item->Title      = _wcsdup(title != NULL ? title : L"");
        item->Text       = _wcsdup(text != NULL ? text : L"");
        item->EnforcedDt = Stove_IModuleFetchGameTermsForSteamContent_GetEnforcedDt(content);
        item->MustAgree  = (agreeType != NULL && wcscmp(agreeType, L"FIRST_MUST") == 0);
    }

    /* Show the terms screen with the copied values. Display every item you received. */
    ShowGameTermsUI(g_Terms, g_TermsCount);

    /* Never call Destroy() on result or on the terms items. */
}

Notes

  • Indices start at 0 and are valid up to GetContentCount() - 1. If you go outside this range, NULL will be returned, so be sure to check for null values even inside loops.
  • GetContentAt() The lifetime of the object returned here is the same as that of this object. It becomes invalid once the callback completes.
  • The terms body can be lengthy. Instead of rendering the screen inside the callback, it is better to copy the values and build the screen outside the callback.
  • The body (Text) is delivered as HTML. If that does not fit your UI, contact technical support to receive plain text instead.
  • If the search results show 0 entries, it means there are no terms and conditions to display on the screen. Please verify the number of entries before proceeding to submit your consent.
  • One item corresponds to one block on the terms screen (title, body, effective date, consent type). If several items are returned, repeat that block for each of them.

See Also


IModuleFetchGameTermsForSteamParam

Kind Struct · Module APIModule · Version 1.0.0

Description

Contains the parameters required for the Stove_APIModule_FetchGameTermsForSteam call. Sets the game ID and the terms and conditions type.

Set it to Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_FetchGameTermsForSteamParam), fill in the value, call the function, and when the function returns, release it as Destroy().

The "Terms Type" (AgType) is a value that determines which set of terms to apply. The Steam Game Service Terms of Service are k_EStoveFetchGameTermsForSteamAgType_Steam (1), and the AGS Transfer Terms are k_EStoveFetchGameTermsForSteamAgType_Mig (2).

AgType The default value is k_EStoveFetchGameTermsForSteamAgType_Default (0), and querying with this value will return the Steam Game Terms of Service. Set this to 2 only when you need the AGS Transfer Terms of Service.

Declaration

c
typedef struct IModuleFetchGameTermsForSteamParam IModuleFetchGameTermsForSteamParam;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
GameIdconst wchar_t*Reading and WritingStove_IModuleFetchGameTermsForSteamParam_GetGameId() / SetGameId()This is a unique ID issued when you register a game on the Stove platform.
AgTypeint32_tReading and WritingStove_IModuleFetchGameTermsForSteamParam_GetAgType() / SetAgType()This is the type of terms of service to display. Enter the value EStoveFetchGameTermsForSteamAgType. If you do not enter a value, 0 will be used, and the Steam Game Service Terms of Service will be displayed.

Memory Management

ItemValue
Creating EntityCaller (Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_FetchGameTermsForSteamParam))
Responsibility for DismantlingCaller (Destroy() required) — Releases the resource after the terms-of-service lookup function returns
String OwnershipThe string passed to SetGameId() is stored in a copy of the parameter object. The caller's buffer can be cleared immediately.

Example

c
IModuleFetchGameTermsForSteamParam* param =
    (IModuleFetchGameTermsForSteamParam*)Stove_APIModule_CreateParam(
        k_EStoveAPIModuleTypeKind_FetchGameTermsForSteamParam);

Stove_IModuleFetchGameTermsForSteamParam_SetGameId(param, L"YOUR_GAME_ID");
Stove_IModuleFetchGameTermsForSteamParam_SetAgType(param, k_EStoveFetchGameTermsForSteamAgType_Steam);

Stove_APIModule_FetchGameTermsForSteam(param, OnFetchGameTermsFinished, NULL);

Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)param);

Notes

  • AgType is declared as int32_t. Simply enter the enumeration value as is.
  • This parameter does not contain a Steam session token. Terms of Service lookups work based solely on the game ID and the type of terms of service.
  • If the game entry check fails with error code 406401 (Terms of Service not accepted), use this API to retrieve the Terms of Service, display them on the screen, and submit the form with error code Stove_APIModule_AgreeToGameTermsForSteam after obtaining consent.

See Also


IModuleGameCheckerForSteamGdsInfo

Kind Struct · Module APIModule · Version 1.0.0

Description

This is regional information derived from IModuleGameCheckerForSteamOutcome to GetGdsInfo(). It includes the country of access, the regulations applicable to that country, the time zone, and the language.

The system identifies the server based on the connection IP address. If it cannot be identified, the default value is filled in, and IsDefault becomes true. Use this value on screens that require regulatory notation (e.g., GDPR) or for time displays.

This object is owned by the parent result object. Do not call Destroy(); instead, copy any values you wish to retain within the callback.

Declaration

c
typedef struct IModuleGameCheckerForSteamGdsInfo IModuleGameCheckerForSteamGdsInfo;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
IsDefaultboolReadStove_IModuleGameCheckerForSteamGdsInfo_GetIsDefault()If the country could not be determined based on the IP address and the default value was used, the code is true.
Nationconst wchar_t*ReadStove_IModuleGameCheckerForSteamGdsInfo_GetNation()This is a country code (ISO 3166-1 ALPHA-2).
Regulationconst wchar_t*ReadStove_IModuleGameCheckerForSteamGdsInfo_GetRegulation()This is the name of the regulation that applies based on the country code (e.g., GDPR).
Timezoneconst wchar_t*ReadStove_IModuleGameCheckerForSteamGdsInfo_GetTimezone()This is a time zone ID in IANA TZDB format (e.g., Asia/Seoul).
UtcOffsetint32_tReadStove_IModuleGameCheckerForSteamGdsInfo_GetUtcOffset()This is the UTC offset for that time zone. The unit is minutes (for Korean Standard Time, it is 540).
Langconst wchar_t*ReadStove_IModuleGameCheckerForSteamGdsInfo_GetLang()This is a language code (ISO 639-1 ALPHA-2).

Memory Management

ItemValue
Creating EntitySDK
Responsibility for DismantlingSDK (Do Not Release) — Owned by the parent result object; it is invalidated when the callback returns.
StringThe returned const wchar_t* is an internal buffer. To save it, you must copy it within the callback.

Example

c
void __cdecl OnGameCheckerFinished(const IModuleAPICallbackResult* callbackResult,
                                   const IModuleGameCheckerForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (!Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        /* Please implement the logic for when an error occurs. */
        return;
    }

    const IModuleGameCheckerForSteamGdsInfo* gdsInfo =
        Stove_IModuleGameCheckerForSteamOutcome_GetGdsInfo(result);

    if (gdsInfo != NULL)
    {
        const wchar_t* nation = Stove_IModuleGameCheckerForSteamGdsInfo_GetNation(gdsInfo);
        const wchar_t* regulation = Stove_IModuleGameCheckerForSteamGdsInfo_GetRegulation(gdsInfo);
        int32_t utcOffset =
            Stove_IModuleGameCheckerForSteamGdsInfo_GetUtcOffset(gdsInfo);

        /* Copy the values you want to use outside the callback here. */
        (void)nation;
        (void)regulation;
        (void)utcOffset;
    }

    /* Do not call Destroy() on gdsInfo. */
}

Notes

  • The unit of UtcOffset is minutes. To convert to hours, divide by 60. If you need to handle time zones accurately, it is safer to use the IANA time zone ID Timezone in conjunction with this value.
  • This object does not have a member that returns the client's IP address. Even if some documentation states that the IP address interpreted by the server is required, it is not provided by the current interface.
  • It is a different type from IModuleStoveGDSInfo, which has the same member composition. In that case, it is an object returned by the synchronization lookup function, and the caller must release it.
  • If the game entry check fails, an object with an empty value is passed.

See Also


IModuleGameCheckerForSteamMaintenanceInfo

Kind Struct · Module APIModule · Version 1.0.0

Description

This is maintenance information obtained from IModuleGameCheckerForSteamOutcome to GetMaintenanceInfo(). It includes the maintenance period, as well as the title and body of the announcement.

This value is populated when the game entry check fails due to maintenance (k_EStoveGameCheckerForSteamResultCode_GameServerMaintenance, 503100). In all other cases, it is passed as an empty object.

The maintenance notice screen is implemented by the developer. You can use the title (Title) and body (Msg) as-is on the screen.

This object is owned by the parent result object. Do not call Destroy(); instead, copy the values you want to keep inside the callback.

Declaration

c
typedef struct IModuleGameCheckerForSteamMaintenanceInfo IModuleGameCheckerForSteamMaintenanceInfo;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
StartDtint64_tReadStove_IModuleGameCheckerForSteamMaintenanceInfo_GetStartDt()This is the start time of the check. The unit is milliseconds (Unix epoch).
EndDtint64_tReadStove_IModuleGameCheckerForSteamMaintenanceInfo_GetEndDt()This is the time the check ended. The unit is milliseconds (Unix epoch).
Typeconst wchar_t*ReadStove_IModuleGameCheckerForSteamMaintenanceInfo_GetType()This is the inspection type.
UseYnconst wchar_t*ReadStove_IModuleGameCheckerForSteamMaintenanceInfo_GetUseYn()This indicates whether the maintenance notice is displayed. It is the string "Y" or "N".
Titleconst wchar_t*ReadStove_IModuleGameCheckerForSteamMaintenanceInfo_GetTitle()This is the title of the maintenance notice.
Msgconst wchar_t*ReadStove_IModuleGameCheckerForSteamMaintenanceInfo_GetMsg()Main text of the maintenance notice.
GameIdconst wchar_t*ReadStove_IModuleGameCheckerForSteamMaintenanceInfo_GetGameId()This is the game ID to be checked.

Memory Management

ItemValue
Creating EntitySDK
Responsibility for DismantlingSDK (Do Not Release) — Owned by the parent result object; it is invalidated when the callback returns.
StringThe returned const wchar_t* is an internal buffer. To save it, you must copy it within the callback.

Example

ShowNoticeUI() in the example is a placeholder function that the SDK does not provide. It belongs to your game UI, so implement it yourself.

c
void __cdecl OnGameCheckerFinished(const IModuleAPICallbackResult* callbackResult,
                                   const IModuleGameCheckerForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        /* Please implement the logic for a successful outcome. */
        return;
    }

    if (Stove_IModuleAPICallbackResult_GetExternalError(callbackResult)
        == k_EStoveGameCheckerForSteamResultCode_GameServerMaintenance)
    {
        const IModuleGameCheckerForSteamMaintenanceInfo* maintenanceInfo =
            Stove_IModuleGameCheckerForSteamOutcome_GetMaintenanceInfo(result);

        if (maintenanceInfo != NULL)
        {
            const wchar_t* title =
                Stove_IModuleGameCheckerForSteamMaintenanceInfo_GetTitle(maintenanceInfo);
            const wchar_t* msg =
                Stove_IModuleGameCheckerForSteamMaintenanceInfo_GetMsg(maintenanceInfo);
            int64_t endDt =
                Stove_IModuleGameCheckerForSteamMaintenanceInfo_GetEndDt(maintenanceInfo);

            /* Use the text delivered by the SDK as-is on the notice screen. */
            /* ShowNoticeUI is the notice screen you implement. */
            ShowNoticeUI(title,   /* maintenance notice title - use as the screen title */
                         msg,     /* maintenance notice body - use as the body */
                         endDt);  /* maintenance end time (epoch ms) - the game picks the format */

            /* Close the game once the user confirms. Calling again yields the same result. */
        }
    }

    /* Do not call Destroy() in maintenanceInfo. */
}

Notes

  • This object is passed even when it is not being inspected. It is passed as an empty object, but please perform a null check as well.
  • Whether a check has been performed is determined by the return code (GetExternalError() is 503100), not by the value of this object.
  • UseYn is the string "Y" / "N", not bool.
  • During the check, calling the game entry check again will produce the same result. Please handle this by displaying the guidance screen and then exiting the game.

See Also


IModuleGameCheckerForSteamMember

Kind Struct · Module APIModule · Version 1.0.0

Description

This is member information obtained as IModuleGameCheckerForSteamOutcome of GetMember(). It contains account-level information such as the Stove member number, nickname, country of registration, verification status, and registration date and time.

This is a data type that the SDK populates and passes via a callback. The caller does not create it directly.

This object is owned by the parent result object. Do not call Destroy(); instead, copy any values you wish to retain within the callback.

Declaration

c
typedef struct IModuleGameCheckerForSteamMember IModuleGameCheckerForSteamMember;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
AccountTypeint32_tReadStove_IModuleGameCheckerForSteamMember_GetAccountType()This is the account type code. For example, 15 indicates a Steam account. Since the list of values may grow, please treat any unknown values as "Other."
MemberNoint64_tReadStove_IModuleGameCheckerForSteamMember_GetMemberNo()This is your Stove member number. It is a unique identifier for your account.
ProviderCdconst wchar_t*ReadStove_IModuleGameCheckerForSteamMember_GetProviderCd()These are the enrollment path (IDP) codes (e.g., SO, FB, GP, STEAM, STEAM_SHADOW, VTCO).
CountryCdconst wchar_t*ReadStove_IModuleGameCheckerForSteamMember_GetCountryCd()This is the country code (ISO 3166-1 ALPHA-2).
Nicknameconst wchar_t*ReadStove_IModuleGameCheckerForSteamMember_GetNickname()This is my Stove username.
PersonVerifyYnconst wchar_t*ReadStove_IModuleGameCheckerForSteamMember_GetPersonVerifyYn()This indicates whether identity verification has been completed. It is the string "Y" or "N".
ParentVerifyYnconst wchar_t*ReadStove_IModuleGameCheckerForSteamMember_GetParentVerifyYn()This indicates whether the legal representative has been verified. It is the string "Y" or "N".
EmailVerifyYnconst wchar_t*ReadStove_IModuleGameCheckerForSteamMember_GetEmailVerifyYn()This indicates whether email verification has been completed. It is the string "Y" or "N".
RegDtint64_tReadStove_IModuleGameCheckerForSteamMember_GetRegDt()This is the sign-up time. The unit is milliseconds (Unix epoch).
BirthDtint64_tReadStove_IModuleGameCheckerForSteamMember_GetBirthDt()This is the date of birth. The unit is milliseconds (Unix epoch).

Memory Management

ItemValue
Creating EntitySDK
Responsibility for DismantlingSDK (Do Not Release) — Owned by the parent result object; it becomes invalid when the callback returns.
StringThe returned const wchar_t* is an internal buffer. To save it, you must copy it within the callback.

Example

c
void __cdecl OnGameCheckerFinished(const IModuleAPICallbackResult* callbackResult,
                                   const IModuleGameCheckerForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (!Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        /* Please implement the logic for when a failure occurs. */
        return;
    }

    const IModuleGameCheckerForSteamMember* member =
        Stove_IModuleGameCheckerForSteamOutcome_GetMember(result);

    if (member != NULL)
    {
        int64_t memberNo = Stove_IModuleGameCheckerForSteamMember_GetMemberNo(member);
        const wchar_t* nickname = Stove_IModuleGameCheckerForSteamMember_GetNickname(member);
        const wchar_t* personVerifyYn =
            Stove_IModuleGameCheckerForSteamMember_GetPersonVerifyYn(member);

        /* Copy the values you want to use outside the callback here. */
        (void)memberNo;
        (void)nickname;
        (void)personVerifyYn;
    }

    /* Do not call Destroy() on `member`. */
}

Notes

  • The three fields for authentication status are the strings "Y" and "N", not bool. When comparing them, treat them as strings.
  • RegDt and BirthDt are values in milliseconds relative to the epoch. The game handles converting them into a format suitable for display.
  • The linking procedure does not vary depending on the account type. AccountType is a value that is only referenced when the game requires it.
  • If the game entry check fails, an object with an empty value is passed.

See Also


IModuleGameCheckerForSteamOutcome

Kind Struct · Module APIModule · Version 1.0.0

Description

This is the result data passed as the second argument to the Stove_APIModule_GameCheckerForSteam callback. It contains the issued token and expiration time, as well as member information, game user IDs, region information, sanctions information, and maintenance information as child objects.

This is the data type that the SDK populates and passes via a callback. The caller does not create it directly.

Token and member information are populated only when the operation is successful. Sanction information is populated during a sanction (403201), and maintenance information is populated during a maintenance (503100); when neither applies, the object contains empty values.

This object and all its child objects are owned by the SDK and become invalid the moment the callback returns. Do not call Destroy(); instead, perform a deep copy of any values you want to keep within the callback. Since strings are passed by pointer, saving the pointer itself can create a dangling pointer, which may cause a crash.

Declaration

c
typedef struct IModuleGameCheckerForSteamOutcome IModuleGameCheckerForSteamOutcome;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
AccessTokenconst wchar_t*ReadStove_IModuleGameCheckerForSteamOutcome_GetAccessToken()This is the issued Stove access token.
RefreshTokenconst wchar_t*ReadStove_IModuleGameCheckerForSteamOutcome_GetRefreshToken()This is the issued Stove renewal token.
ExpiresInint64_tReadStove_IModuleGameCheckerForSteamOutcome_GetExpiresIn()This is the validity period of the access token. The unit is milliseconds.
ExpireInint32_tReadStove_IModuleGameCheckerForSteamOutcome_GetExpireIn()This is the validity period of the access token. The unit is seconds.
Memberconst IModuleGameCheckerForSteamMember*ReadStove_IModuleGameCheckerForSteamOutcome_GetMember()This is the information for the logged-in member.
Userconst IModuleGameCheckerForSteamUser*ReadStove_IModuleGameCheckerForSteamOutcome_GetUser()This is a list of game user IDs and registration channels.
GdsInfoconst IModuleGameCheckerForSteamGdsInfo*ReadStove_IModuleGameCheckerForSteamOutcome_GetGdsInfo()This is information about the country, regulations, time zone, and language.
RestrictInfoconst IModuleGameCheckerForSteamRestrictInfo*ReadStove_IModuleGameCheckerForSteamOutcome_GetRestrictInfo()This is information about game sanctions. The value is populated only in the "Sanction Status" field (403201).
MaintenanceInfoconst IModuleGameCheckerForSteamMaintenanceInfo*ReadStove_IModuleGameCheckerForSteamOutcome_GetMaintenanceInfo()This is information about the game server maintenance. The value is only populated in the maintenance status field (503100).

Child object

Subobjects also provide access functions following the same rule (Stove_<Interface>_<Method>). Please refer to the respective documents for details on their member composition.

TypeContent
IModuleGameCheckerForSteamMemberAccount information, such as member number, username, country of registration, and verification status
IModuleGameCheckerForSteamUserService Identifier and Game User ID
IModuleGameCheckerForSteamGdsInfoCountry · Regulations · Time Zone · Language
IModuleGameCheckerForSteamRestrictInfoSanction Period, Type, and Reason (403201)
IModuleGameCheckerForSteamMaintenanceInfoMaintenance Period · Notice Title · Body (503100)

Memory Management

ItemValue
Creating EntitySDK
Responsibility for DismantlingSDK (Do not unwrap — becomes invalid once the callback returns)
Child objectThis object owns it. It is not released separately.
StringThe const wchar_t* returned is this object's internal buffer. You must copy it if you want to save it.

Example

c
void __cdecl OnGameCheckerFinished(const IModuleAPICallbackResult* callbackResult,
                                   const IModuleGameCheckerForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        /* Token — Copy it to save it. */
        const wchar_t* accessToken = Stove_IModuleGameCheckerForSteamOutcome_GetAccessToken(result);
        int64_t expiresInMs = Stove_IModuleGameCheckerForSteamOutcome_GetExpiresIn(result);
        (void)accessToken;
        (void)expiresInMs;

        /* Subobject — Member Information */
        const IModuleGameCheckerForSteamMember* member =
            Stove_IModuleGameCheckerForSteamOutcome_GetMember(result);
        if (member != NULL)
        {
            int64_t memberNo = Stove_IModuleGameCheckerForSteamMember_GetMemberNo(member);
            const wchar_t* nickname = Stove_IModuleGameCheckerForSteamMember_GetNickname(member);
            (void)memberNo;
            (void)nickname;
        }

        /* Game User ID */
        const IModuleGameCheckerForSteamUser* user =
            Stove_IModuleGameCheckerForSteamOutcome_GetUser(result);
        if (user != NULL)
        {
            const wchar_t* userId = Stove_IModuleGameCheckerForSteamUser_GetUserId(user);
            (void)userId;
        }
        return;
    }

    /* If sanctions apply, the system reads the sanctions information and displays it on the guidance screen. */
    if (Stove_IModuleAPICallbackResult_GetExternalError(callbackResult)
        == k_EStoveGameCheckerForSteamResultCode_GameRestrict)
    {
        const IModuleGameCheckerForSteamRestrictInfo* restrictInfo =
            Stove_IModuleGameCheckerForSteamOutcome_GetRestrictInfo(result);
        if (restrictInfo != NULL)
        {
            const wchar_t* label =
                Stove_IModuleGameCheckerForSteamRestrictInfo_GetBanTypeLabel(restrictInfo);
            (void)label;
        }
    }

    /* "result" and all its child objects will be invalidated once this callback finishes. Do not call Destroy(). */
}

Notes

  • ExpiresIn (milliseconds) and ExpireIn (seconds) differ by only one character in their names but represent different units. Please do not confuse them.
  • Subobjects are passed as empty objects even when that isn't the case. Still, it's safer to include a null check.
  • I believe the cause of the failure is Stove_IModuleAPICallbackResult_GetExternalError(), the first argument of the callback, rather than this object.
  • The regional information (IModuleGameCheckerForSteamGdsInfo) does not contain a field that returns the client IP as interpreted by the server.

See Also


IModuleGameCheckerForSteamParam

Kind Struct · Module APIModule · Version 1.0.0

Description

Contains the parameters required for the Stove_APIModule_GameCheckerForSteam call. Set the two values: the game ID and the Steam session token.

Set it to Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_GameCheckerForSteamParam), fill in the value, call the function, and when the function returns, release it by setting it to Destroy(). Although this is an asynchronous function, the SDK copies the value at the time of the call, so you can release it immediately without waiting for the callback.

Steam session tokens are issued once per process by Steamworks and are reused throughout the game session. You do not need to issue a new one each time you call the function.

Declaration

c
typedef struct IModuleGameCheckerForSteamParam IModuleGameCheckerForSteamParam;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
GameIdconst wchar_t*Reading and WritingStove_IModuleGameCheckerForSteamParam_GetGameId() / SetGameId()This is a unique ID issued when a game is registered on the Stove platform.
SteamSessionTokenconst wchar_t*Reading and WritingStove_IModuleGameCheckerForSteamParam_GetSteamSessionToken() / SetSteamSessionToken()This is a session token issued via Steamworks ISteamUser::GetAuthTicketForWebApi. It is a lowercase hexadecimal string that is retrieved once per process and reused throughout the game session.

Memory Management

ItemValue
Creating EntityCaller (Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_GameCheckerForSteamParam))
Responsibility for ReleaseCaller (Destroy() required) — Releases the memory after the game entry check function returns
String OwnershipThe string passed to Set...() is stored in a copy of the parameter object. The buffer on the caller's side can be freed immediately.

Example

c
IModuleGameCheckerForSteamParam* param =
    (IModuleGameCheckerForSteamParam*)Stove_APIModule_CreateParam(
        k_EStoveAPIModuleTypeKind_GameCheckerForSteamParam);

Stove_IModuleGameCheckerForSteamParam_SetGameId(param, L"YOUR_GAME_ID");
Stove_IModuleGameCheckerForSteamParam_SetSteamSessionToken(param, steamSessionToken);

Stove_APIModule_GameCheckerForSteam(param, OnGameCheckerFinished, NULL);

Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)param);

Notes

  • If the call fails due to non-acceptance of the terms of service (406401) and you need to call the game entry check again, create a new parameter object, but use the same Steam session token you received initially.
  • If called before initialization is complete, it will fail with error k_EStoveModuleCommonResultCode_NotInitialized(10).
  • The request will proceed normally even after the parameters are released. There is no need to keep the object alive until the callback is received.

See Also


IModuleGameCheckerForSteamRestrictInfo

Kind Struct · Module APIModule · Version 1.0.0

Description

This is account restriction information obtained from IModuleGameCheckerForSteamOutcome to GetRestrictInfo(). It includes the restriction period, restriction type, and reason.

This value is populated when the game entry check fails due to sanctions (k_EStoveGameCheckerForSteamResultCode_GameRestrict, 403201). In all other cases, it is passed as an empty object.

The penalty notification screen is implemented by the developer. The text to display on the screen can include the localized BanTypeLabel and the reason explanation BlockReasonComment.

This object is owned by the parent result object. Do not call Destroy(); instead, copy the values you want to keep inside the callback.

Declaration

c
typedef struct IModuleGameCheckerForSteamRestrictInfo IModuleGameCheckerForSteamRestrictInfo;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
StartDtint64_tReadStove_IModuleGameCheckerForSteamRestrictInfo_GetStartDt()This is the start time of the sanction. The unit is milliseconds (Unix epoch).
EndDtint64_tReadStove_IModuleGameCheckerForSteamRestrictInfo_GetEndDt()This is the time when the sanction ends. The unit is milliseconds (Unix epoch).
Typeconst wchar_t*ReadStove_IModuleGameCheckerForSteamRestrictInfo_GetType()These are the types of sanctions.
BlockReasonCommentconst wchar_t*ReadStove_IModuleGameCheckerForSteamRestrictInfo_GetBlockReasonComment()This is a human-readable explanation of the reason for the restriction.
BlockReasonCdconst wchar_t*ReadStove_IModuleGameCheckerForSteamRestrictInfo_GetBlockReasonCd()These are the codes for the reasons for sanctions.
BanTypeLabelconst wchar_t*ReadStove_IModuleGameCheckerForSteamRestrictInfo_GetBanTypeLabel()This is the text for the sanction type to be displayed on the screen (localized value).

Memory Management

ItemValue
Creating EntitySDK
Responsibility for DismantlingSDK (Do Not Release) — Owned by the parent result object; it is invalidated when the callback returns.
StringThe value const wchar_t* returned is an internal buffer. To store it, you must copy it within the callback.

Example

ShowNoticeUI() in the example is a placeholder function that the SDK does not provide. It belongs to your game UI, so implement it yourself.

c
void __cdecl OnGameCheckerFinished(const IModuleAPICallbackResult* callbackResult,
                                   const IModuleGameCheckerForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        /* Please implement the logic for a successful outcome. */
        return;
    }

    if (Stove_IModuleAPICallbackResult_GetExternalError(callbackResult)
        == k_EStoveGameCheckerForSteamResultCode_GameRestrict)
    {
        const IModuleGameCheckerForSteamRestrictInfo* restrictInfo =
            Stove_IModuleGameCheckerForSteamOutcome_GetRestrictInfo(result);

        if (restrictInfo != NULL)
        {
            const wchar_t* banTypeLabel =
                Stove_IModuleGameCheckerForSteamRestrictInfo_GetBanTypeLabel(restrictInfo);
            const wchar_t* reason =
                Stove_IModuleGameCheckerForSteamRestrictInfo_GetBlockReasonComment(restrictInfo);
            int64_t endDt =
                Stove_IModuleGameCheckerForSteamRestrictInfo_GetEndDt(restrictInfo);

            /* Use the text delivered by the SDK as-is on the notice screen. */
            /* ShowNoticeUI is the notice screen you implement. */
            ShowNoticeUI(banTypeLabel,  /* restriction label - use as the screen title */
                         reason,        /* restriction reason - use as the body */
                         endDt);        /* restriction end time (epoch ms) - the game picks the format */

            /* Close the game once the user confirms. Calling again yields the same result. */
        }
    }

    /* Do not call Destroy() on `restrictInfo`. */
}

Notes

  • This object is passed even when sanctions are not in effect. It is passed as an empty object, but please also perform a null check.
  • Whether a sanction applies is determined by the resulting code (GetExternalError() becomes 403201), not by the value of this object.
  • For permanent sanctions, EndDt could result in a value far in the future. It is safer to set an upper limit when calculating and displaying the remaining duration.
  • If you need a display message, use BanTypeLabel. Type and BlockReasonCd are code values used to branch game-related processing.

See Also


IModuleGameCheckerForSteamUser

Kind Struct · Module APIModule · Version 1.0.0

Description

This is game user information obtained from IModuleGameCheckerForSteamOutcome to GetUser(). It contains the unique identifier used to distinguish users within the game and a list of the registration paths associated with that user.

This object is owned by the parent result object. Do not call Destroy(); instead, copy the values you wish to preserve within the callback.

Declaration

c
typedef struct IModuleGameCheckerForSteamUser IModuleGameCheckerForSteamUser;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
ServiceIdconst wchar_t*ReadStove_IModuleGameCheckerForSteamUser_GetServiceId()This is the Stove service identifier.
UserIdconst wchar_t*ReadStove_IModuleGameCheckerForSteamUser_GetUserId()This is the game user identifier (GUID string).

Memory Management

ItemValue
CreatorSDK
Responsibility for DismantlingSDK (Do Not Release) — Owned by the parent result object; it is invalidated when the callback returns.
StringThe returned const wchar_t* is an internal buffer. To save it, you must copy it within the callback.

Example

c
void __cdecl OnGameCheckerFinished(const IModuleAPICallbackResult* callbackResult,
                                   const IModuleGameCheckerForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (!Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        /* Please implement the logic for when an error occurs. */
        return;
    }

    const IModuleGameCheckerForSteamUser* user =
        Stove_IModuleGameCheckerForSteamOutcome_GetUser(result);

    if (user != NULL)
    {
        const wchar_t* userId = Stove_IModuleGameCheckerForSteamUser_GetUserId(user);
        (void)userId;

    }

    /* Do not call Destroy() on `user`. */
}

Notes

  • If the game entry check fails, an object with an empty value is passed.

See Also


IModuleStoveGDSInfo

Kind Struct · Module APIModule · Version 1.0.0

Description

Stove_APIModule_GetGdsInfo is the regional information returned as an output parameter. It contains the country of access, the regulations applicable to that country, the time zone, and the language.

The system identifies the server based on its connection IP. If it cannot be identified, the default value is filled in, and IsDefault becomes true.

Since this is an object passed as an out parameter to a synchronous function, the caller must free it. Although it has the same member structure as the IModuleGameCheckerForSteamGdsInfo included in the game entry check results, its type and deallocation rules are different.

Declaration

c
typedef struct IModuleStoveGDSInfo IModuleStoveGDSInfo;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
IsDefaultboolReadStove_IModuleStoveGDSInfo_GetIsDefault()If the country could not be identified and the default value was used, the error code is true.
Nationconst wchar_t*ReadStove_IModuleStoveGDSInfo_GetNation()This is the country code (ISO 3166-1 ALPHA-2).
Regulationconst wchar_t*ReadStove_IModuleStoveGDSInfo_GetRegulation()This is the name of the regulation that applies based on the country code (e.g., GDPR).
Timezoneconst wchar_t*ReadStove_IModuleStoveGDSInfo_GetTimezone()This is a time zone ID in IANA TZDB format (e.g., Asia/Seoul).
UtcOffsetint32_tReadStove_IModuleStoveGDSInfo_GetUtcOffset()This is the UTC offset for that time zone. The unit is minutes (for Korean Standard Time, it is 540).
Langconst wchar_t*ReadStove_IModuleStoveGDSInfo_GetLang()This is a language code (ISO 639-1 ALPHA-2).

Memory Management

ItemValue
Creating EntitySDK (the "out" parameter of Stove_APIModule_GetGdsInfo())
Responsibility for DismantlingCaller (Destroy() required) — Deallocates the value after it has been fully read
Objects to Unlock TogetherThe caller also releases the IModuleAPIResult* returned by the same call.
StringThe returned const wchar_t* is this object's internal buffer. Since it becomes invalid when the object is deallocated, you must copy it if you want to keep it.

Example

c
IModuleStoveGDSInfo* gdsInfo = NULL;
IModuleAPIResult* result = Stove_APIModule_GetGdsInfo(&gdsInfo);

if (Stove_IModuleAPIResult_IsSuccessful(result) && gdsInfo != NULL)
{
    const wchar_t* nation = Stove_IModuleStoveGDSInfo_GetNation(gdsInfo);
    const wchar_t* lang = Stove_IModuleStoveGDSInfo_GetLang(gdsInfo);
    int32_t utcOffset = Stove_IModuleStoveGDSInfo_GetUtcOffset(gdsInfo);
    (void)nation;
    (void)lang;
    (void)utcOffset;
    /* Please implement the logic for the success case. */
}
else
{
    /* Please implement the logic for when an error occurs. */
}

if (gdsInfo != NULL)
{
    Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)gdsInfo);
}
Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)result);

Notes

  • The unit of UtcOffset is minutes. To convert it to hours, divide by 60. If you need to handle time zones accurately, it is safer to use the IANA time zone ID Timezone along with it.
  • This object does not have a member that returns the client IP as interpreted by the server.
  • The out parameter and the return value are different objects. You must free both of them to prevent a memory leak.
  • If the call fails, the out parameter may not be populated. Check for null values first.

See Also


IModuleTypeBase

Kind Struct · Module APIModule · Version 1.0.0

Description

This is the base interface for all IModule* objects provided by APIModule. It offers four functions: runtime type checking, ownership verification, deallocation, and extension lookup.

Since the parameter object, the result object, and the data object passed to the callback all inherit from this interface, you can cast any object to IModuleTypeBase* to release it or check its type.

The responsibility for deallocation varies by object. If ShouldDestroy() returns true, the caller must deallocate it using Destroy(); if it returns false, the SDK owns it, so it must not be deallocated.

Declaration

c
typedef struct IModuleTypeBase IModuleTypeBase;
// To access members, use the access functions listed in the member table below.

Members

NameTypeAccessAccessorDescription
TypeKindint32_tReadStove_IModuleTypeBase_GetTypeKind()This is a runtime type identifier. It corresponds to the value EStoveAPIModuleTypeKind.
ShouldDestroyboolReadStove_IModuleTypeBase_ShouldDestroy()If the caller is the object that should call Destroy(), it is true. If it is an object owned by the SDK, it is false.
DestroyvoidCallStove_IModuleTypeBase_Destroy()Releases the object. Call this only on objects where ShouldDestroy() equals true.
QueryExtvoid*ReadStove_IModuleTypeBase_QueryExt()Queries the extension pointer. extId is an extension identifier, 0 and 10xFFFF are reserved ranges, and 0x10000 and above are ranges defined by the module. In the current configuration, all identifiers return NULL.

Memory Management

ItemValue
Creating EntityIt varies by object. The parameter object created with Stove_APIModule_CreateParam() and the result object returned by a synchronous function are owned by the caller, while objects received as callback arguments are owned by the SDK.
Responsibility for DismantlingIf ShouldDestroy() is true, it is the caller; if it is false, it is the SDK
Evaluation CriteriaYou can determine this as ShouldDestroy() without having to memorize the source.

You must not call Destroy() on objects owned by the SDK. This includes IModuleAPICallbackResult and IModuleXxxOutcome—which are passed as callback arguments—and their child objects.

Example

c
/* You can determine whether any IModule* object has been released in the same way. */
static void ReleaseIfNeeded(IModuleTypeBase* obj)
{
    if (obj == NULL)
    {
        return;
    }

    if (Stove_IModuleTypeBase_ShouldDestroy(obj))
    {
        Stove_IModuleTypeBase_Destroy(obj);
    }
}

void Sample(void)
{
    IModuleTypeBase* param =
        Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_GameCheckerForSteamParam);

    /* Check Type */
    if (Stove_IModuleTypeBase_GetTypeKind(param)
        == k_EStoveAPIModuleTypeKind_GameCheckerForSteamParam)
    {
        /* Set the parameters and call the API. */
    }

    ReleaseIfNeeded(param);
}

Notes

  • Stove_APIModule_CreateParam() returns IModuleTypeBase*. When using it, cast it to an interface pointer that matches the requested type, and when freeing it, cast it back to IModuleTypeBase*.
  • Destroy() accepts only non-const pointers. All other accessors accept const pointers.
  • You must not reuse a pointer to a deallocated object. After deallocation, it is safest to initialize it to NULL.
  • QueryExt() is reserved for future versions in case the interface needs to be expanded. It is not needed in the current configuration.

See Also


Stove_APIModule_AgreeToGameTermsForSteam

Kind Function · Module APIModule · Version 1.0.0

Description

This function submits the user's consent to the server from the developer's Terms of Service screen. It is called when the game entry check fails with the error 406401 (Terms of Service consent required); it displays the Terms of Service (Stove_APIModule_FetchGameTermsForSteam()), obtains the user's consent, and then executes this function.

If this call succeeds, it calls Stove_APIModule_GameCheckerForSteam() again to continue checking for game entry.

Call this after receiving the success callback from Stove_APIModule_Initialize(). If called before initialization, it will fail with k_EStoveModuleCommonResultCode_NotInitialized(10). For the Steam session token passed to param, use the exact same value used for the game entry check.

This is an asynchronous function. The result is passed to onFinished, and to receive the callback, you must be running Stove_APIModule_RunCallback() in the game loop.

The code returned by the server to indicate acceptance of the terms of service is Stove_IModuleAPICallbackResult_GetExternalError(), not Stove_IModuleAPIResult_GetResultCode(). If you make a decision based solely on the result code, you won't be able to determine the cause of the failure.

Declaration

c
void Stove_APIModule_AgreeToGameTermsForSteam(const IModuleAgreeToGameTermsForSteamParam* param, OnAPIModuleAgreeToGameTermsForSteamCallback onFinished, void* userData);

Parameters

NameTypeRequiredDescription
paramconst IModuleAgreeToGameTermsForSteamParam*YThis is the game ID and Steam session token. Set it to Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_AgreeToGameTermsForSteamParam).
onFinishedOnAPIModuleAgreeToGameTermsForSteamCallbackYThis is the callback that receives the result. If you pass NULL, the request will be sent, but you will not be able to receive the result.
userDatavoid*NThis is user data that is passed directly to the callback. If not used, pass NULL.

The members of param are as follows.

NameTypeRequiredAccessorDescription
GameIdconst wchar_t*YStove_IModuleAgreeToGameTermsForSteamParam_SetGameId()This is a unique ID issued when you register a game on the Stove platform.
SteamSessionTokenconst wchar_t*YStove_IModuleAgreeToGameTermsForSteamParam_SetSteamSessionToken()This value was issued via Steamworks ISteamUser::GetAuthTicketForWebApi. It is the same value used to check for game entry.

Returns

None

Callback

c
typedef void(STOVE_MODULE_API* OnAPIModuleAgreeToGameTermsForSteamCallback)(const IModuleAPICallbackResult* callbackResult, const IModuleAgreeToGameTermsForSteamOutcome* result);
NameTypeDescription
callbackResultconst IModuleAPICallbackResult*Here are the results of the call. GetResult() contains the result code, GetExternalError() contains the terms of service acceptance code, GetErrorMsg() contains the server message, and GetUserData() retrieves the value passed during the call, userData.
resultconst IModuleAgreeToGameTermsForSteamOutcome*Here are the results of the consent processing. You can retrieve the GUID issued by the server as Stove_IModuleAgreeToGameTermsForSteamOutcome_GetGuid(). If the operation fails, an empty object is returned.

The callback runs on the thread that called Stove_APIModule_RunCallback(). It is not an internal SDK thread. Stove_APIModule_RunCallback() must be called from the game UI (main) thread.

A callback is called only once per request.

Error Codes

This is the value obtained from Stove_IModuleAPIResult_GetResultCode().

CodeNameDescriptionShow to UserIn-Game Message
0k_EStoveModuleCommonResultCode_SuccessYour agreement to the terms and conditions has been processed.x
1k_EStoveModuleCommonResultCode_FailThe server responded, but the terms of service agreement failed. The actual reason is contained in GetExternalError().x
2k_EStoveModuleCommonResultCode_InvalidParamonFinished is NULL. In this case, the callback is not called, so it cannot be observed in the game.x
10k_EStoveModuleCommonResultCode_NotInitializedThe module has not been initialized. Please call this after Stove_APIModule_Initialize() has succeeded.x
21k_EStoveModuleCommonResultCode_HttpErrorThe HTTP status code in the server response is not 200. In this case, the code returned by the server is also stored in GetExternalError().O
22k_EStoveModuleCommonResultCode_ResponseErrorThe response body cannot be parsed (syntax error).O
253k_EStoveModuleCommonResultCode_UnmanagedExceptionAn unknown exception occurred during processing.O
254k_EStoveModuleCommonResultCode_ManagedExceptionAn exception occurred during processing.O

The terms and conditions acceptance code is Stove_IModuleAPICallbackResult_GetExternalError(). Full list: EStoveAgreeToGameTermsForSteamResultCode

Complete list: EStoveModuleCommonResultCode

Memory Management

ObjectOwnerRelease
paramCallerStove_IModuleTypeBase_Destroy((IModuleTypeBase*)param) Required. You can free it immediately after the function returns.
Callback callbackResult, resultSDKDo Not Unlock. It will be invalidated once the callback returns.
Subobject of callbackResult (GetResult())SDKDo Not Unlock. Owned by the parent object.
The memory pointed to by userDataCallerThe SDK is not involved. Keep it alive until the callback is called.

Example

c
void __cdecl OnAgreeToGameTermsFinished(const IModuleAPICallbackResult* callbackResult,
                                        const IModuleAgreeToGameTermsForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        // Success — Using the same Steam session token
        // Call `Stove_APIModule_GameCheckerForSteam()` again.
        return;
    }

    // Please implement the logic for when a failure occurs.
    // int32_t agreeCode = Stove_IModuleAPICallbackResult_GetExternalError(callbackResult);
}

void SubmitGameTermsAgreement(const wchar_t* gameId, const wchar_t* steamSessionToken)
{
    IModuleAgreeToGameTermsForSteamParam* param = (IModuleAgreeToGameTermsForSteamParam*)
        Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_AgreeToGameTermsForSteamParam);

    Stove_IModuleAgreeToGameTermsForSteamParam_SetGameId(param, gameId);
    Stove_IModuleAgreeToGameTermsForSteamParam_SetSteamSessionToken(param, steamSessionToken);

    Stove_APIModule_AgreeToGameTermsForSteam(param, OnAgreeToGameTermsFinished, NULL);

    // Since this object was created by the caller, be sure to release it.
    Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)param);
}

// Called every frame in the game loop (game UI thread)
// Stove_APIModule_RunCallback();

Notes

  • Consent is submitted per game, not per item. The parameter carries only the game ID and the Steam session token; it does not report which items were checked. Even if you place a checkbox on each item, submit only once.
  • Call this function only if the user has agreed to the required terms and conditions. This function simply submits the request without checking whether consent has been given.
  • The Steam session token is the exact value used to verify access to the game. It is issued once per process and reused throughout the game session.
  • After the operation succeeds, the game entry check is called again. The same token is used in this case as well.
  • The value returned by GetGuid() is an identifier used for internal processing by Stove. The game does not need to interpret or store it.
  • Be sure to make a copy of any strings you want to keep within the callback. Once the callback returns, the pointer becomes invalid.

See Also


Stove_APIModule_CreateParam

Kind Function · Module APIModule · Version 1.0.0

Description

All parameter objects for APIModule are created using this single function. It creates an object corresponding to the value specified in kind and returns it as IModuleTypeBase*; the game then casts it to the desired parameter type, populates it with values, and passes it to the API.

The parameter series kind is grouped in the 500 range. If you pass a value from the results/data series (0–30) or an unknown value, it will not be treated as an error but will return NULL; therefore, you must check the return value first.

Objects created with this function are owned by the caller. Even after passing them to the API, ownership remains with the caller, so you must release them manually.

Declaration

c
IModuleTypeBase* Stove_APIModule_CreateParam(EStoveAPIModuleTypeKind kind);

Parameters

NameTypeRequiredDescription
kindEStoveAPIModuleTypeKindYThe type of parameter object to be created. Only values in the 500 range are valid.

The following values can be entered in kind.

CodeNameCreated Type
500k_EStoveAPIModuleTypeKind_APIInitializeParamIModuleAPIInitializeParam
501k_EStoveAPIModuleTypeKind_GameCheckerForSteamParamIModuleGameCheckerForSteamParam
502k_EStoveAPIModuleTypeKind_FetchGameTermsForSteamParamIModuleFetchGameTermsForSteamParam
503k_EStoveAPIModuleTypeKind_AgreeToGameTermsForSteamParamIModuleAgreeToGameTermsForSteamParam

Returns

TypeDescription
IModuleTypeBase*This is a pointer to the created object. If kind is not in the parameter range or is an unknown value, NULL is returned.

Error Codes

None. This function is a factory function that does not return IModuleAPIResult; whether it fails is determined solely by whether the return value is NULL.

Memory Management

ObjectOwnerRelease
Returned IModuleTypeBase*CallerStove_IModuleTypeBase_Destroy() Required. Ownership remains with the caller even after passing it to the API.

Example

c
IModuleTypeBase* base = Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_GameCheckerForSteamParam);
if (base != NULL)
{
    IModuleGameCheckerForSteamParam* param = (IModuleGameCheckerForSteamParam*)base;

    Stove_IModuleGameCheckerForSteamParam_SetGameId(param, L"YOUR_GAME_ID");
    Stove_IModuleGameCheckerForSteamParam_SetSteamSessionToken(param, steamSessionToken);

    Stove_APIModule_GameCheckerForSteam(param, OnGameCheckerFinished, NULL);

    // Since this object was created by the caller, be sure to release it.
    Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)param);
}
else
{
    // Please implement the logic for handling cases where the "kind" value is incorrect.
}

Notes

  • First, check if the return value is NULL, and then cast it.
  • You can also release the parameters passed to an asynchronous API immediately after the function returns. The SDK copies the necessary values at the time of the call.
  • If you're unsure whether it's unwrapped, you can check using Stove_IModuleTypeBase_ShouldDestroy(). Objects created with this function are always true.

See Also


Stove_APIModule_FetchGameTermsForSteam

Kind Function · Module APIModule · Version 1.0.0

Description

Retrieves the title and body of the game's terms of service to be displayed to the user. This function retrieves the content to be displayed on the developer's consent screen when the game entry check fails with the error 406401 (terms of service agreement required).

The Terms and Conditions screen is implemented directly by the developer. This function only provides the values to be displayed on the screen and submits the consent result as Stove_APIModule_AgreeToGameTermsForSteam().

The values delivered in the callback map to the screen as follows: Title is the terms title, Text is the terms body, EnforcedDt is the effective date, and AgreeType is the classification the server assigns. The screen title, the consent checkbox label, the button labels, and the date format are not supplied by the SDK, so the developer decides them.

Call this after receiving the success callback from Stove_APIModule_Initialize(). If called before initialization, it will fail with k_EStoveModuleCommonResultCode_NotInitialized(10).

This is an asynchronous function. The result is passed to onFinished, and you must be running Stove_APIModule_RunCallback() in the game loop to receive the callback.

The terms body (Text) is delivered as HTML.

The value entered in STOVE Partners is relayed as-is, so it contains HTML by default. If your game UI cannot display HTML as-is, plain text can be provided instead — please contact technical support.

The code returned by the server for the terms of service lookup is Stove_IModuleAPICallbackResult_GetExternalError(), not Stove_IModuleAPIResult_GetResultCode(). If you make decisions based solely on the response code, you won't be able to determine the cause of the failure.

Declaration

c
void Stove_APIModule_FetchGameTermsForSteam(const IModuleFetchGameTermsForSteamParam* param, OnAPIModuleFetchGameTermsForSteamCallback onFinished, void* userData);

Parameters

NameTypeRequiredDescription
paramconst IModuleFetchGameTermsForSteamParam*YThese are the game ID and the type of terms of service. Set them to Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_FetchGameTermsForSteamParam).
onFinishedOnAPIModuleFetchGameTermsForSteamCallbackYThis is the callback that receives the result. If you pass NULL, the request will be sent, but you will not be able to receive the result.
userDatavoid*NThis is user data that is passed directly to the callback. If it is not used, pass NULL.

The members of param are as follows.

NameTypeRequiredAccessorDescription
GameIdconst wchar_t*YStove_IModuleFetchGameTermsForSteamParam_SetGameId()This is a unique ID issued when you register a game on the Stove platform.
AgTypeint32_tNStove_IModuleFetchGameTermsForSteamParam_SetAgType()This is the type of terms of service to be displayed. Enter the value EStoveFetchGameTermsForSteamAgType. If not specified, 0 is used, and the Steam Game Service Terms of Service are displayed.

Returns

None

Callback

c
typedef void(STOVE_MODULE_API* OnAPIModuleFetchGameTermsForSteamCallback)(const IModuleAPICallbackResult* callbackResult, const IModuleFetchGameTermsForSteamOutcome* result);
NameTypeDescription
callbackResultconst IModuleAPICallbackResult*Here are the results of the call. GetResult() returns the result code, GetExternalError() returns the terms and conditions lookup code, GetErrorMsg() returns the server message, and GetUserData() returns userData, which was passed during the call.
resultconst IModuleFetchGameTermsForSteamOutcome*This is a list of the terms and conditions that were retrieved. Stove_IModuleFetchGameTermsForSteamOutcome_GetContentCount() returns the count, and GetContentAt(index) returns the items. An empty object is returned even if the operation fails.

The callback runs on the thread that called Stove_APIModule_RunCallback(). It is not an internal SDK thread. Stove_APIModule_RunCallback() must be called from the game UI (main) thread.

A callback is called only once per request.

Error Codes

This is the value obtained from Stove_IModuleAPIResult_GetResultCode().

CodeNameDescriptionShow to UserIn-Game Message
0k_EStoveModuleCommonResultCode_SuccessThe terms were retrieved.x
1k_EStoveModuleCommonResultCode_FailThe server responded, but the terms and conditions lookup failed. The actual reason is contained in GetExternalError().x
2k_EStoveModuleCommonResultCode_InvalidParamonFinished is NULL. In this case, the callback is not called, so it cannot be observed in the game.x
10k_EStoveModuleCommonResultCode_NotInitializedThe module has not been initialized. Please call this after Stove_APIModule_Initialize() has succeeded.x
21k_EStoveModuleCommonResultCode_HttpErrorThe HTTP status code in the server response is not 200. In this case, the code returned by the server is also stored in GetExternalError().O
22k_EStoveModuleCommonResultCode_ResponseErrorThe response body cannot be parsed (syntax error).O
253k_EStoveModuleCommonResultCode_UnmanagedExceptionAn unknown exception occurred during processing.O
254k_EStoveModuleCommonResultCode_ManagedExceptionAn exception occurred during processing.O

The terms and conditions lookup code is Stove_IModuleAPICallbackResult_GetExternalError(). Full list: EStoveFetchGameTermsForSteamResultCode

Complete list: EStoveModuleCommonResultCode

Memory Management

ObjectOwnerRelease
paramCallerStove_IModuleTypeBase_Destroy((IModuleTypeBase*)param) Required. You can deallocate it immediately after the function returns.
Callback callbackResult, resultSDKDo not unregister. It will be invalidated once the callback returns.
Subobject of result (GetContentAt())SDKDo Not Release. Owned by parent object
The memory pointed to by userDataCallerThe SDK is not involved. Keep it alive until the callback is called.

Example

ShowGameTermsUI() in the example is a placeholder function that the SDK does not provide. It belongs to your game UI, so implement it yourself.

c
// Model handed to the terms screen. The SDK pointers go invalid once the callback returns,
// so copy the values here.
typedef struct GameTermsItem
{
    wchar_t* Title;         // terms title      - Title
    wchar_t* Text;          // terms body       - Text
    int64_t  EnforcedDt;    // effective date   - EnforcedDt (epoch milliseconds)
    int      MustAgree;     // mandatory or not - whether AgreeType is L"FIRST_MUST"
} GameTermsItem;

#define MAX_GAME_TERMS 16
static GameTermsItem g_Terms[MAX_GAME_TERMS];
static uint32_t      g_TermsCount = 0;

void __cdecl OnFetchGameTermsFinished(const IModuleAPICallbackResult* callbackResult,
                                      const IModuleFetchGameTermsForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (!Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        // Implement your failure handling here. Read the lookup code with GetExternalError().
        return;
    }

    uint32_t count = Stove_IModuleFetchGameTermsForSteamOutcome_GetContentCount(result);
    g_TermsCount = 0;

    for (uint32_t i = 0; i < count && g_TermsCount < MAX_GAME_TERMS; ++i)
    {
        const IModuleFetchGameTermsForSteamContent* content =
            Stove_IModuleFetchGameTermsForSteamOutcome_GetContentAt(result, i);
        if (content == NULL)
            continue;

        const wchar_t* title     = Stove_IModuleFetchGameTermsForSteamContent_GetTitle(content);
        const wchar_t* text      = Stove_IModuleFetchGameTermsForSteamContent_GetText(content);
        const wchar_t* agreeType = Stove_IModuleFetchGameTermsForSteamContent_GetAgreeType(content);

        GameTermsItem* item = &g_Terms[g_TermsCount++];
        item->Title      = _wcsdup(title != NULL ? title : L"");
        item->Text       = _wcsdup(text != NULL ? text : L"");
        item->EnforcedDt = Stove_IModuleFetchGameTermsForSteamContent_GetEnforcedDt(content);
        item->MustAgree  = (agreeType != NULL && wcscmp(agreeType, L"FIRST_MUST") == 0);
    }

    // Show the terms screen with the copied values. The screen itself is yours to build.
    // Place a single combined consent checkbox at the bottom of the screen, then submit with
    // Stove_APIModule_AgreeToGameTermsForSteam().
    ShowGameTermsUI(g_Terms, g_TermsCount);
}

void RequestGameTerms(const wchar_t* gameId)
{
    IModuleFetchGameTermsForSteamParam* param = (IModuleFetchGameTermsForSteamParam*)
        Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_FetchGameTermsForSteamParam);

    Stove_IModuleFetchGameTermsForSteamParam_SetGameId(param, gameId);
    Stove_IModuleFetchGameTermsForSteamParam_SetAgType(param, k_EStoveFetchGameTermsForSteamAgType_Steam);

    Stove_APIModule_FetchGameTermsForSteam(param, OnFetchGameTermsFinished, NULL);

    // The caller created this object, so it must be destroyed.
    Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)param);
}

// Call every frame from the game loop (game UI thread)
// Stove_APIModule_RunCallback();

Notes

  • Stove_APIModule_Initialize() This is called after receiving the success callback.
  • There may be multiple terms and conditions. Please use GetContentCount() to check the number and display them all on the screen.
  • The consent type varies by item. If the value of Stove_IModuleFetchGameTermsForSteamContent_GetAgreeType() is L"FIRST_MUST", the item requires first-time consent; if it is L"NONE", the item falls outside that classification. Both types require consent.
  • The language of the Terms and Conditions follows the value set in Stove_APIModule_SetLanguage(). Please set the language before viewing the Terms and Conditions.
  • Be sure to make a copy of any strings you want to retain within the callback. Once the callback returns, the pointer becomes invalid.
  • Instead of a checkbox per item, place a single combined consent checkbox at the bottom of the screen. Keep the consent button disabled until the user agrees.
  • Consent is submitted per game, not per item. The request does not carry which items were checked, so even if you place a checkbox on each item, submit only once.
  • This function is for lookup only. You must submit a separate request to Stove_APIModule_AgreeToGameTermsForSteam() to process consent.

See Also


Stove_APIModule_GameCheckerForSteam

Kind Function · Module APIModule · Version 1.0.0

Description

It handles authentication on the Stove platform using a Steam session token and verifies whether the user is authorized to enter the game. It serves as a single entry point that combines login and game entry verification; upon success, it retrieves the access token, user profile information, game user ID, and region information all at once.

Call this after receiving the success callback from Stove_APIModule_Initialize(). If called before initialization, it will fail with k_EStoveModuleCommonResultCode_NotInitialized(10). The Steam session token passed to param is a value issued by Steamworks once per process and reused throughout the game session.

This is an asynchronous function. The result is passed to onFinished, and to receive the callback, you must be running Stove_APIModule_RunCallback() in the game loop.

If successful, the SDK internally passes the login information it has obtained to PCSDK3. There is no step where the developer retrieves the token and passes it directly to PCSDK3.

The game entry check codes returned by the server (such as 406401) are passed as Stove_IModuleAPICallbackResult_GetExternalError(), not Stove_IModuleAPIResult_GetResultCode(). If you make decisions based solely on the result code, you won't be able to determine the cause of the failure.

Declaration

c
void Stove_APIModule_GameCheckerForSteam(const IModuleGameCheckerForSteamParam* param, OnAPIModuleGameCheckerForSteamCallback onFinished, void* userData);

Parameters

NameTypeRequiredDescription
paramconst IModuleGameCheckerForSteamParam*YThis is the game ID and Steam session token. Set it to Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_GameCheckerForSteamParam).
onFinishedOnAPIModuleGameCheckerForSteamCallbackYThis is the callback that receives the result. If you pass NULL, the request will be sent but you will not receive a result.
userDatavoid*NThis is user data that is passed directly to the callback. If you don't use it, pass NULL.

The members of param are as follows.

NameTypeRequiredAccessorDescription
GameIdconst wchar_t*YStove_IModuleGameCheckerForSteamParam_SetGameId()This is a unique ID issued when you register a game on the Stove platform.
SteamSessionTokenconst wchar_t*YStove_IModuleGameCheckerForSteamParam_SetSteamSessionToken()This value was issued via Steamworks ISteamUser::GetAuthTicketForWebApi. It is retrieved once per process and reused.

Returns

None

Callback

c
typedef void(STOVE_MODULE_API* OnAPIModuleGameCheckerForSteamCallback)(const IModuleAPICallbackResult* callbackResult, const IModuleGameCheckerForSteamOutcome* result);
NameTypeDescription
callbackResultconst IModuleAPICallbackResult*Here are the results of the call. Stove_IModuleAPICallbackResult_GetResult() contains the result code, GetExternalError() contains the game entry check code, GetErrorMsg() contains the server message, and GetUserData() outputs userData, which was passed during the call.
resultconst IModuleGameCheckerForSteamOutcome*This is the data from the game entry check. Even when the check fails, an empty object is returned; however, during maintenance (403201) and inspection (503100) periods, the corresponding sub-information is populated.

The callback runs on the thread that called Stove_APIModule_RunCallback(). It is not an internal SDK thread. Stove_APIModule_RunCallback() must be called on the game UI (main) thread.

A callback is called only once per request.

Error Codes

This is the value obtained from Stove_IModuleAPIResult_GetResultCode().

CodeNameDescriptionShow to UserIn-Game Message
0k_EStoveModuleCommonResultCode_SuccessYou can now enter the game.x
1k_EStoveModuleCommonResultCode_FailThe server responded, but the game entry check failed. The actual reason is stored in GetExternalError().x
2k_EStoveModuleCommonResultCode_InvalidParamonFinished is NULL. In this case, the callback is not called, so it cannot be observed in the game.x
10k_EStoveModuleCommonResultCode_NotInitializedThe module has not been initialized. Please call this after Stove_APIModule_Initialize() has succeeded.x
21k_EStoveModuleCommonResultCode_HttpErrorThe HTTP status code in the server response is not 200. In this case, the code returned by the server is also stored in GetExternalError().O
22k_EStoveModuleCommonResultCode_ResponseErrorThe response body cannot be parsed (syntax error).O
253k_EStoveModuleCommonResultCode_UnmanagedExceptionAn unknown exception occurred during processing.O
254k_EStoveModuleCommonResultCode_ManagedExceptionAn exception occurred during processing.O

The game entry check code is Stove_IModuleAPICallbackResult_GetExternalError(). Full list: EStoveGameCheckerForSteamResultCode

Complete list: EStoveModuleCommonResultCode

Except for 406401 (which requires agreement to the terms and conditions), all other failures must result in the game closing after displaying an informational screen. The only case where the game entry check is called again is 406401.

Memory Management

ObjectOwnerRelease
paramCallerStove_IModuleTypeBase_Destroy((IModuleTypeBase*)param) Required. You can release it immediately after the function returns.
Callback callbackResult, resultSDKDo not unregister. It will be invalidated once the callback returns.
Subobjects of result (GetMember(), GetUser(), etc.)SDKDo Not Unlock. Owned by the parent object.
The memory pointed to by userDataCallerThe SDK is not involved. Keep it alive until the callback is called.

Example

c
void __cdecl OnGameCheckerFinished(const IModuleAPICallbackResult* callbackResult,
                                   const IModuleGameCheckerForSteamOutcome* result)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);
    int32_t checkCode = Stove_IModuleAPICallbackResult_GetExternalError(callbackResult);

    if (Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        // Success — Copy the required values, then launch PCSDK3.
        const wchar_t* accessToken = Stove_IModuleGameCheckerForSteamOutcome_GetAccessToken(result);
        // wcscpy_s(myBuffer, _countof(myBuffer), accessToken);   // deep copy
        (void)accessToken;
        return;
    }

    if (checkCode == k_EStoveGameCheckerForSteamResultCode_NotAgreeTerms)
    {
        // You are now proceeding to the terms and conditions agreement page.
        // Stove_APIModule_FetchGameTermsForSteam() -> Developer Consent Screen
        // -> Stove_APIModule_AgreeToGameTermsForSteam() -> Call this function again
        return;
    }

    // Other failures — The game closes after displaying the developer information screen.
    // const wchar_t* serverMessage = Stove_IModuleAPICallbackResult_GetErrorMsg(callbackResult);
}

void RequestGameChecker(const wchar_t* gameId, const wchar_t* steamSessionToken)
{
    IModuleGameCheckerForSteamParam* param = (IModuleGameCheckerForSteamParam*)
        Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_GameCheckerForSteamParam);

    Stove_IModuleGameCheckerForSteamParam_SetGameId(param, gameId);
    Stove_IModuleGameCheckerForSteamParam_SetSteamSessionToken(param, steamSessionToken);

    Stove_APIModule_GameCheckerForSteam(param, OnGameCheckerFinished, NULL);

    // Since this object was created by the caller, be sure to release it.
    Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)param);
}

// Called every frame in the game loop (game UI thread)
// Stove_APIModule_RunCallback();

Notes

  • Stove_APIModule_Initialize() This is called after receiving the success callback.
  • Steam session tokens are issued once per process and reused throughout the game session. You do not need to obtain a new one each time you call the function.
  • After agreeing to the terms and conditions, use the same Steam session token when calling this function again.
  • There is no need to differentiate processing based on the account type (AccountType). It behaves the same way regardless of the value.
  • Even if the operation fails, result is returned as an empty object (not null). Check the result code before reading the value.
  • Be sure to make a copy of any strings you want to retain within the callback. Once the callback returns, the pointer becomes invalid.

See Also


Stove_APIModule_GetGdsInfo

Kind Function · Module APIModule · Version 1.0.0

Description

Retrieves GDS information stored in the module. It includes the country of access, applicable regulations, time zone, and language, and can be used to provide region-specific guidance or adjust time formats.

GDS information is obtained during the initialization process, and if the game entry check (Stove_APIModule_GameCheckerForSteam) is successful, it is updated with the value provided by the server.

This is a synchronous function. The caller must free both IModuleAPIResult* and *outGdsInfo.

Even if the operation fails, an object whose outGdsInfo is not NULL will be filled with an empty value. Check the resulting code first, and then perform the release regardless of whether the operation succeeded or failed.

Declaration

c
IModuleAPIResult* Stove_APIModule_GetGdsInfo(IModuleStoveGDSInfo** outGdsInfo);

Parameters

NameTypeRequiredDescription
outGdsInfoIModuleStoveGDSInfo**YThis is the variable that will receive the GDS information pointer. If the value exceeds NULL, it will fail and result in 2, and nothing will be assigned to it.

Returns

TypeDescription
IModuleAPIResult*Here are the results of the call. If Stove_IModuleAPIResult_IsSuccessful() is true, the call was successful. Be sure to release the resource after use.

Error Codes

This is the value obtained from Stove_IModuleAPIResult_GetResultCode().

CodeNameDescriptionShow to UserIn-Game Message
0k_EStoveModuleCommonResultCode_SuccessThe GDS information was retrieved.x
2k_EStoveModuleCommonResultCode_InvalidParamoutGdsInfo is NULL.x
10k_EStoveModuleCommonResultCode_NotInitializedThe module has not been initialized. Please call this after Stove_APIModule_Initialize() has succeeded.x
253k_EStoveModuleCommonResultCode_UnmanagedExceptionAn unknown exception occurred during processing.O
254k_EStoveModuleCommonResultCode_ManagedExceptionAn exception occurred during processing.O

Complete list: EStoveModuleCommonResultCode

Memory Management

ObjectOwnerRelease
*outGdsInfoThe SDK is created, and ownership is transferred to the callerStove_IModuleTypeBase_Destroy((IModuleTypeBase*)gdsInfo) Required. Since the object is initialized even if the operation fails, you must free it.
Returned IModuleAPIResult*CallerStove_IModuleTypeBase_Destroy((IModuleTypeBase*)result) Required

Example

c
IModuleStoveGDSInfo* gdsInfo = NULL;
IModuleAPIResult* result = Stove_APIModule_GetGdsInfo(&gdsInfo);

if (Stove_IModuleAPIResult_IsSuccessful(result))
{
    // Please implement the logic for a successful outcome.
    const wchar_t* nation   = Stove_IModuleStoveGDSInfo_GetNation(gdsInfo);
    const wchar_t* timezone = Stove_IModuleStoveGDSInfo_GetTimezone(gdsInfo);
    int32_t utcOffset       = Stove_IModuleStoveGDSInfo_GetUtcOffset(gdsInfo);
    (void)nation; (void)timezone; (void)utcOffset;
}
else
{
    // Please implement the logic for when an error occurs.
}

if (gdsInfo != NULL)
{
    Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)gdsInfo);
}
Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)result);

Notes

  • Stove_APIModule_Initialize() This is called after receiving the success callback.
  • If the country code cannot be determined from the IP address and the default value is used, Stove_IModuleStoveGDSInfo_GetIsDefault() returns true.
  • GetUtcOffset() passes along the value returned by the server as-is, while GetTimezone() is an IANA time zone ID, such as L"Asia/Seoul".
  • You can also receive the same information in the game entry check callback as IModuleGameCheckerForSteamOutcome in GetGdsInfo().

See Also


Stove_APIModule_GetVersion

Kind Function · Module APIModule · Version 1.0.0

Description

Copy the version string of the module binary into the buffer provided by the game. Including this information when reporting an error will help us identify the cause.

Since it does not check whether it has been initialized, it can be called even before Stove_APIModule_Initialize().

This is a synchronous function. The caller must release the returned IModuleAPIResult*.

Declaration

c
IModuleAPIResult* Stove_APIModule_GetVersion(wchar_t* outVersion, uint32_t length);

Parameters

NameTypeRequiredDescription
outVersionwchar_t*YThis is the buffer that will receive the version string. If the value exceeds NULL, the operation will fail with error code 2.
lengthuint32_tYThis is the buffer size. It is passed as wchar_t, not in bytes. If you pass a value greater than 0, it will fail with error 2.

Returns

TypeDescription
IModuleAPIResult*Here are the results of the call. If Stove_IModuleAPIResult_IsSuccessful() is true, the call was successful. Be sure to release the resource after use.

Error Codes

This is the value obtained from Stove_IModuleAPIResult_GetResultCode().

CodeNameDescriptionShow to UserIn-Game Message
0k_EStoveModuleCommonResultCode_SuccessThe version string was copied.x
2k_EStoveModuleCommonResultCode_InvalidParamoutVersion is either NULL or length is 0; the string was truncated because the buffer is too small. If truncated, the buffer becomes an empty string.x
251k_EStoveModuleCommonResultCode_PCSDKDllNotFoundThe path to the module binary (APIModule.dll) could not be found.O
253k_EStoveModuleCommonResultCode_UnmanagedExceptionAn unknown exception occurred during processing.O
254k_EStoveModuleCommonResultCode_ManagedExceptionAn exception occurred during processing.O

Complete list: EStoveModuleCommonResultCode

Memory Management

ObjectOwnerRelease
outVersion BufferCallerThis is memory allocated by the game. The SDK is not involved.
Returned IModuleAPIResult*CallerStove_IModuleTypeBase_Destroy((IModuleTypeBase*)result) Required

Example

c
wchar_t version[64] = { 0 };

IModuleAPIResult* result = Stove_APIModule_GetVersion(version, (uint32_t)(sizeof(version) / sizeof(wchar_t)));
if (Stove_IModuleAPIResult_IsSuccessful(result))
{
    // Please implement the logic for a successful outcome.
    // The value copied to "version" is logged.
}
else
{
    // Please implement the logic for when a failure occurs.
}

Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)result);

Notes

  • length is wchar_t in number. Do not pass sizeof(buffer) as-is.
  • You can call it even before initialization.
  • If the buffer is too small and the string is truncated, the buffer is reset to an empty string and the operation fails with 2.

See Also


Stove_APIModule_Initialize

Kind Function · Module APIModule · Version 1.0.0

Description

Initializes the APIModule. When you pass the runtime environment, platform name, Steam app ID, and Steam user ID, the module retrieves the server configuration and region (GDS) information and starts the internal loop. All other APIs should be called only after receiving the success callback from this function.

This is an asynchronous function. The result is passed to onFinished, and to receive the callback, you must have Stove_APIModule_RunCallback() running in the game loop. You can start the loop after calling this function, but if you do not run the loop, the callback will never arrive.

Create the parameter object as Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_APIInitializeParam). You can release it immediately after the function returns.

If initialization fails, all subsequent API calls will fail with error code k_EStoveModuleCommonResultCode_NotInitialized(10). When you receive the failure callback, display a notification screen and then exit the game.

Declaration

c
void Stove_APIModule_Initialize(const IModuleAPIInitializeParam* param, OnAPIModuleInitializeCallback onFinished, void* userData);

Parameters

NameTypeRequiredDescription
paramconst IModuleAPIInitializeParam*YThis is the initialization information. Set it to Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_APIInitializeParam).
onFinishedOnAPIModuleInitializeCallbackYThis is the callback that receives the result. If you pass NULL, the initialization will proceed, but you will not be able to receive the result.
userDatavoid*NThis is user data that is passed directly to the callback. If it is not used, it will exceed NULL.

The members of param are as follows.

NameTypeRequiredAccessorDescription
Environmentconst wchar_t*YStove_IModuleAPIInitializeParam_SetEnvironment()This is the runtime environment. Enter L"live" for production and L"sandbox" for development and testing. These values are not case-sensitive.
PlatformNameconst wchar_t*YStove_IModuleAPIInitializeParam_SetPlatformName()This is the name of an external platform. L"STEAM" is a constant value.
SteamAppIdconst wchar_t*YStove_IModuleAPIInitializeParam_SetSteamAppId()This is the app ID registered on Steam. It is sent along with the game access check and the request to agree to the terms of service.
SteamUserIdconst wchar_t*YStove_IModuleAPIInitializeParam_SetSteamUserId()This is your Steam User ID (SteamID). It is sent along with the game access verification and the request to agree to the terms of service.

Returns

None

Callback

c
typedef void(STOVE_MODULE_API* OnAPIModuleInitializeCallback)(const IModuleAPICallbackResult* callbackResult);
NameTypeDescription
callbackResultconst IModuleAPICallbackResult*Here are the results of the call. Stove_IModuleAPICallbackResult_GetResult() returns the result code, GetErrorMsg() returns the error message, and GetUserData() returns the value passed during the call, userData.

The initialization callback receives only callbackResult, with no result data.

The callback runs on the thread that called Stove_APIModule_RunCallback(). It is not an internal SDK thread. Stove_APIModule_RunCallback() must be called from the game UI (main) thread.

A callback is called only once per request.

Error Codes

This is the value obtained from Stove_IModuleAPIResult_GetResultCode().

CodeNameDescriptionShow to UserIn-Game Message
0k_EStoveModuleCommonResultCode_SuccessInitialization was successful.x
1k_EStoveModuleCommonResultCode_FailUnable to retrieve server settings or region (GDS) information.x
2k_EStoveModuleCommonResultCode_InvalidParamEnvironment is empty or does not contain a valid value (including leading and trailing spaces). This code is also used when onFinished is equal to NULL, but in that case, the callback is not invoked and therefore cannot be observed in the game.x
11k_EStoveModuleCommonResultCode_AlreadyInitializedIt was called again while already initialized.x
251k_EStoveModuleCommonResultCode_PCSDKDllNotFoundThe version check failed because the path to the module binary (APIModule.dll) could not be found.O
253k_EStoveModuleCommonResultCode_UnmanagedExceptionAn exception of an unknown type has occurred. There is no cause string.O
254k_EStoveModuleCommonResultCode_ManagedExceptionA formatted exception has occurred. The cause string is stored in GetErrorMsg().O

Complete list: EStoveModuleCommonResultCode

Memory Management

ObjectOwnerRelease
paramCallerStove_IModuleTypeBase_Destroy((IModuleTypeBase*)param) Required. You can free the memory immediately after the function returns.
Callback callbackResultSDKDo not unregister. It will be invalidated once the callback returns.
Subobject of callbackResult (GetResult())SDKDo Not Unlock. Owned by the parent object.
The memory pointed to by userDataCallerThe SDK is not involved. Keep it alive until the callback is called.

Example

c
void __cdecl OnInitializeFinished(const IModuleAPICallbackResult* callbackResult)
{
    const IModuleAPIResult* apiResult = Stove_IModuleAPICallbackResult_GetResult(callbackResult);

    if (Stove_IModuleAPIResult_IsSuccessful(apiResult))
    {
        // Please implement the logic for a successful outcome.
        // Next, call Stove_APIModule_GameCheckerForSteam().
    }
    else
    {
        // Please implement the logic for when a failure occurs.
        // const wchar_t* message = Stove_IModuleAPICallbackResult_GetErrorMsg(callbackResult);
    }
}

void InitializeAPIModule(const wchar_t* steamAppId, const wchar_t* steamUserId)
{
    IModuleAPIInitializeParam* param = (IModuleAPIInitializeParam*)
        Stove_APIModule_CreateParam(k_EStoveAPIModuleTypeKind_APIInitializeParam);

    Stove_IModuleAPIInitializeParam_SetEnvironment(param, L"live");
    Stove_IModuleAPIInitializeParam_SetPlatformName(param, L"STEAM");
    Stove_IModuleAPIInitializeParam_SetSteamAppId(param, steamAppId);
    Stove_IModuleAPIInitializeParam_SetSteamUserId(param, steamUserId);

    Stove_APIModule_Initialize(param, OnInitializeFinished, NULL);

    // Since this object was created by the caller, be sure to release it.
    Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)param);
}

// Called every frame in the game loop (game UI thread)
// Stove_APIModule_RunCallback();

Notes

  • After receiving the initialization success callback, call Stove_APIModule_GameCheckerForSteam.
  • Stove_APIModule_RunCallback() The initialization callback will not be triggered unless you run the loop.
  • The platform name is fixed as L"STEAM". External platforms other than Steam are not supported.
  • If you enter a string other than the value specified in Environment, initialization will fail at 2(InvalidParam). Since leading and trailing spaces are not allowed, be sure to trim any spaces if you are reading the value from a configuration file or the command line. The value is case-insensitive.
  • Initializing the Steamworks SDK and retrieving Steam user information are the game's responsibility. This module does not include the Steamworks SDK.
  • If you call this again after it has already been initialized, it will fail with error code 11. Please call the initialization function only once.
  • To exit, call Stove_APIModule_UnInitialize().

See Also


Stove_APIModule_RunCallback

Kind Function · Module APIModule · Version 1.0.0

Description

Handles the results (callbacks) of asynchronous APIs. All asynchronous callbacks from APIModule are passed exclusively through this function, and they are executed on the thread that called this function, not on an internal SDK thread.

It must be called from the game UI (main) thread. This allows you to interact directly with the game UI within the callback, eliminating the need for separate synchronization.

If you do not run this function, the callback will never be triggered. The same applies to the initialization callback, so be sure to keep calling it in the game loop from the moment you start the integration.

This is a function that is called periodically within the game loop (every frame or every tick). Do not use this function by simply calling it while(true) times in a loop.

Declaration

c
void Stove_APIModule_RunCallback();

Parameters

None

Returns

None

Error Codes

None. This function does not return a result object.

Memory Management

This function does not create or return a separate object.

Example

c
// Example of a Game Loop (Game UI Thread)
while (isGameRunning)
{
    // ... Game Logic ...

    Stove_APIModule_RunCallback();

    // ... the rest of the loop logic, such as rendering ...
}

Notes

  • Callbacks for all asynchronous APIs are executed on the thread that called this function.
  • It is safer to run the loop before calling the asynchronous function.
  • If there are no pending callbacks, it does nothing and returns immediately.
  • Once you've called Stove_APIModule_UnInitialize(), you don't need to call it again.

See Also


Stove_APIModule_SetLanguage

Kind Function · Module APIModule · Version 1.0.0

Description

Sets the language to be used by the module. This value is included in server requests and determines the language in which the terms and conditions or server error messages are displayed.

Before viewing the Terms of Service, make sure to set the language to match the game's display language. If you do not set it, the default language specified at the time of initialization will be used.

This is a synchronous function. The caller must release the returned IModuleAPIResult*.

Declaration

c
IModuleAPIResult* Stove_APIModule_SetLanguage(const wchar_t* lang);

Parameters

NameTypeRequiredDescription
langconst wchar_t*YThis is a language tag in the BCP 47 format. Examples: L"ko", L"en", L"ja". It is not case-sensitive. If you enter L"system", the language of the operating system will be used.

Returns

TypeDescription
IModuleAPIResult*Here are the results of the call. If Stove_IModuleAPIResult_IsSuccessful() is true, the call was successful. Be sure to release the resource after use.

Error Codes

This is the value obtained from Stove_IModuleAPIResult_GetResultCode().

CodeNameDescriptionShow to UserIn-Game Message
0k_EStoveModuleCommonResultCode_SuccessThe language has been set.x
2k_EStoveModuleCommonResultCode_InvalidParamlang is either NULL, empty, or an unsupported language code. In this case, the language setting will not change.x
10k_EStoveModuleCommonResultCode_NotInitializedThe module has not been initialized. Please call this after Stove_APIModule_Initialize() has succeeded.x
253k_EStoveModuleCommonResultCode_UnmanagedExceptionAn unknown exception occurred during processing.O
254k_EStoveModuleCommonResultCode_ManagedExceptionAn exception occurred during processing.O

Complete List: EStoveModuleCommonResultCode

Memory Management

ObjectOwnerRelease
langCallerThis is a string owned by the game. Since the SDK copies the value, you can free it after the call.
Returned IModuleAPIResult*CallerStove_IModuleTypeBase_Destroy((IModuleTypeBase*)result) Required

Example

c
IModuleAPIResult* result = Stove_APIModule_SetLanguage(L"ko");
if (Stove_IModuleAPIResult_IsSuccessful(result))
{
    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for when a failure occurs.
}

Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)result);

Notes

  • Stove_APIModule_Initialize() This is called after receiving the success callback.
  • If you enter an unsupported language code, it will fail with error code 2, and the existing settings will remain unchanged.
  • If you enter L"system", the language will follow the operating system's language setting; if the operating system's language is not on the supported list, it will be set to English (en).
  • You must call this function before the Terms and Conditions lookup (Stove_APIModule_FetchGameTermsForSteam) for the text of the Terms and Conditions to be returned in the desired language.

See Also


Stove_APIModule_UnInitialize

Kind Function · Module APIModule · Version 1.0.0

Description

This function cleans up the APIModule. It closes internal loops and releases communication resources, and clears the queue of unprocessed callbacks. This function pairs with Stove_APIModule_Initialize() and is called when the game ends.

This is a synchronous function. The caller must release the returned IModuleAPIResult*.

Function names are written with an uppercase I, not Stove_APIModule_UnInitialize. It is not Uninitialize.

After calling this function, any callbacks that have not yet been passed will be discarded. If you need the results of an ongoing asynchronous request, call this function after receiving the callback.

Declaration

c
IModuleAPIResult* Stove_APIModule_UnInitialize();

Parameters

None

Returns

TypeDescription
IModuleAPIResult*Here are the results of the call. If Stove_IModuleAPIResult_IsSuccessful() is true, the call was successful. Be sure to release it after use.

Error Codes

This is the value obtained from Stove_IModuleAPIResult_GetResultCode().

CodeNameDescriptionShow to UserIn-Game Message
0k_EStoveModuleCommonResultCode_SuccessThe cleanup was successful.x
10k_EStoveModuleCommonResultCode_NotInitializedIt was called before initialization. Even in this case, the internal cleanup routine continues.x
253k_EStoveModuleCommonResultCode_UnmanagedExceptionAn unknown exception occurred during processing.O
254k_EStoveModuleCommonResultCode_ManagedExceptionAn exception occurred during processing.O

Complete List: EStoveModuleCommonResultCode

Memory Management

ObjectOwnerRelease
Returned IModuleAPIResult*CallerStove_IModuleTypeBase_Destroy((IModuleTypeBase*)result) Required

Example

c
IModuleAPIResult* result = Stove_APIModule_UnInitialize();
if (Stove_IModuleAPIResult_IsSuccessful(result))
{
    // Please implement the logic for the success case.
}
else
{
    // Please implement the logic for when an error occurs.
}

Stove_IModuleTypeBase_Destroy((IModuleTypeBase*)result);

Notes

  • Call this once when exiting the game.
  • Even if it is called without being initialized (10), internal cleanup proceeds as usual.
  • After calling this function, you do not need to call Stove_APIModule_RunCallback() again.

See Also