Skip to content
Stove
Last Updated

PC SDK Unity Reference — 3.4.x and Earlier

Based on SDK version 3.4.x. 125 items combined in alphabetical order.

Contents

NameKindModule
Base_AccessTokenRenewedFunctionBase
Base_GetAccessTokenFunctionBase
Base_GetGdsFunctionBase
Base_GetSigninFunctionBase
Base_GetTraceHintFunctionBase
Base_GetUserFunctionBase
Base_GetVersionFunctionBase
Base_InitializeFunctionBase
Base_InitializeExFunctionBase
Base_OpenExternalUrlFunctionBase
Base_OverImmersionNotificationFunctionBase
Base_RestartAppIfNecessaryFunctionBase
Base_RestartAppIfNecessaryAsyncFunctionBase
Base_RestartAppIfNecessaryAsyncExFunctionBase
Base_RestartAppIfNecessaryAsyncEx2FunctionBase
Base_RunCallbackFunctionBase
Base_RunCallbackWithTimeoutFunctionBase
Base_SetGameProfileFunctionBase
Base_SetLanguageFunctionBase
Base_SetLanguageExFunctionBase
Base_ShutdownNotificationFunctionBase
Base_UnInitializeFunctionBase
Base_VietnamAgeRatingNotificationFunctionBase
Base_VietnamOverimmersionNotificationFunctionBase
BaseSDKMethodEnumBase
BaseSDKResultCodeResult CodeBase
CallbackResultStructBase
DiscountTypeEnumIAP
IAP_CloseAllPopupsFunctionIAP
IAP_ConfirmPurchaseFunctionIAP
IAP_FetchInventoryFunctionIAP
IAP_FetchProductsFunctionIAP
IAP_FetchProductsExFunctionIAP
IAP_FetchShopCategoriesFunctionIAP
IAP_FetchTermsAgreementFunctionIAP
IAP_FetchTermsAgreementExFunctionIAP
IAP_FetchVoidedPurchasesFunctionIAP
IAP_FetchVoidedPurchasesExFunctionIAP
IAP_GetVersionFunctionIAP
IAP_InitializeFunctionIAP
IAP_InitializeWithWndInfoFunctionIAP
IAP_StartPaymentFunctionIAP
IAP_StartPaymentExFunctionIAP
IAP_StartPurchaseFunctionIAP
IAP_StartPurchaseExFunctionIAP
IAP_UnInitializeFunctionIAP
IAPSDKMethodEnumIAP
IAPSDKResultCodeResult CodeIAP
Log_GetVersionFunctionLog
Log_InitializeFunctionLog
Log_SendFunctionLog
Log_UnInitializeFunctionLog
LogSDKMethodEnumLog
LogSDKResultCodeResult CodeLog
PCBang_CheckPCBangStatusFunctionPCBang
PCBang_GetVersionFunctionPCBang
PCBang_InitializeFunctionPCBang
PCBang_UnInitializeFunctionPCBang
PCBang_UserLoginFunctionPCBang
PCBang_UserLogoutFunctionPCBang
PCBangPremiumEnumPCBang
PCBangSDKMethodEnumPCBang
PCBangSDKResultCodeResult CodePCBang
ProductTypeCodeEnumIAP
PurchaseLimitTypeCodeEnumIAP
PurchaseProgressEnumIAP
ResultStructBase
StoveAPI_FreeStructFunctionBase
StoveLanguageEnumBase
StoveOverlayModeEnumBase
StovePCBangStatusStructPCBang
StovePCBangUserLoginStructPCBang
StovePCChargeInfoStructIAP
StovePCFetchProductParamStructIAP
StovePCGameProfileStructBase
StovePCGdsStructBase
StovePCInitializeParamStructBase
StovePCInitializeParamEx2StructBase
StovePCInventoryItemStructIAP
StovePCLogSendParamStructLog
StovePCOrderProductStructIAP
StovePCOverImmersionStructBase
StovePCPaymentOperationEnumIAP
StovePCPaymentOptionStructIAP
StovePCPopupDisallowedStructView
StovePCProductStructIAP
StovePCProductExStructIAP
StovePCPurchasedProductStructIAP
StovePCPurchaseOperationEnumIAP
StovePCPurchaseOptionStructIAP
StovePCPurchaseResultStructIAP
StovePCRefreshUserBenefitsStructPCBang
StovePCShopCategoryStructIAP
StovePCShutdownStructBase
StovePCSigninStructBase
StovePCStartPurchaseParamStructIAP
StovePCTermsOperationEnumIAP
StovePCTermsOptionStructIAP
StovePCTokenStructBase
StovePCTraceHintStructBase
StovePCUserStructBase
StovePCVietnamAgeRatingInfoStructBase
StovePCVietnamOverimmersionInfoStructBase
StovePCVoidedPurchaseStructIAP
StovePCVoidedPurchasesExStructIAP
StovePCVoidedPurchasesMarketTypeEnumIAP
View_AutoPopupFunctionView
View_AutoPopupExFunctionView
View_CloseAllPopupsFunctionView
View_CouponPopupFunctionView
View_CouponPopupExFunctionView
View_FetchWebOpenKeyFunctionView
View_GetVersionFunctionView
View_InitializeFunctionView
View_InitializeWithWndInfoFunctionView
View_ManualPopupFunctionView
View_ManualPopupExFunctionView
View_NewsPopupFunctionView
View_NewsPopupExFunctionView
View_SetPopupDisallowedFunctionView
View_UnInitializeFunctionView
View_VerifyIdentificationPopupFunctionView
ViewSDKMethodEnumView
ViewSDKResultCodeResult CodeView
WebViewModeEnumBase

Base_AccessTokenRenewed

Kind Function · Module Base · Version 3.3.0

Description

Base_AccessTokenRenewed is a function that registers a callback to be called whenever the access token is renewed. Once registered, the callback is called repeatedly each time the token is renewed.

If you call onFinished again, any previously registered callbacks of the same type will be replaced by the new callback.

Declaration

csharp
public static void Base_AccessTokenRenewed(OnRenewTokenFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnRenewTokenFinishedNA callback to be called when the token is renewed. Passing null will unregister it.

Returns

TypeDescription
voidNone

Callback

csharp
public delegate void OnRenewTokenFinished(CallbackResult result, StovePCToken token);
NameTypeDescription
resultCallbackResultRenewal Results
tokenStovePCTokenUpdated token information

The callback runs in the thread that called Base_RunCallback(). It is called repeatedly each time the token is renewed.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

void OnRenewTokenFinished(CallbackResult callbackResult, StovePCToken token)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic that uses `token.accessToken`.
    }
}

Base_AccessTokenRenewed(OnRenewTokenFinished);

Notes

  • This is a notification-type callback that is called repeatedly. It differs in nature from callbacks for one-time asynchronous APIs, such as Base_RestartAppIfNecessaryAsync.

See Also


Base_GetAccessToken

Kind Function · Module Base · Version 3.0.0.4

Description

Base_GetAccessToken is a function that returns the current access token by populating accessToken with it. It must be called after initialization.

Declaration

csharp
public static Result Base_GetAccessToken(ref string accessToken, uint length);

Parameters

NameTypeRequiredDescription
accessTokenref stringYVariable to receive the access token
lengthuintYBuffer size (number of characters) used internally to fill accessToken

Returns

TypeDescription
ResultQuery results. Success is determined by IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

string accessToken = string.Empty;
Result result = Base_GetAccessToken(ref accessToken, 1024);

if (result.IsSuccessful())
{
    // Please implement the logic that uses the accessToken.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • To receive a notification when the token is renewed, you must use Base_AccessTokenRenewed.
  • Do not keep the retrieved token in the game and reuse it later. The SDK renews the token periodically, so a stored value can expire. Call this function every time a token is needed and use the value returned at that moment.

See Also


Base_GetGds

Kind Function · Module Base · Version 3.1.0

Description

Base_GetGds is a function that populates StovePCGds with the user's GDS information and returns it. It must be called after initialization.

Declaration

csharp
public static Result Base_GetGds(ref StovePCGds gds);

Parameters

NameTypeRequiredDescription
gdsref StovePCGdsYVariable to receive GDS information

Returns

TypeDescription
ResultQuery results. Success is determined by IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
83INVALID_GDS_INFOThe GDS information is incorrect. You must verify the initialization status.x
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

StovePCGds gds = default;
Result result = Base_GetGds(ref gds);

if (result.IsSuccessful())
{
    // Please implement logic that uses gds.nation, gds.regulation, and so on.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • If the operation fails, gds will remain at its default value (default).

See Also


Base_GetSignin

Kind Function · Module Base · Version 3.1.0

Description

Base_GetSignin is a function that fills in the user's login information into StovePCSignin and returns it. It must be called after initialization.

Declaration

csharp
public static Result Base_GetSignin(ref StovePCSignin signin);

Parameters

NameTypeRequiredDescription
signinref StovePCSigninYVariable to store the retrieved login credentials

Returns

TypeDescription
ResultQuery results. Success is determined by IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check exceptionMessage.OA temporary problem has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

StovePCSignin signin = default;
Result result = Base_GetSignin(ref signin);

if (result.IsSuccessful())
{
    // Please implement the logic that uses `signin.personVerify`, `signin.nationality`, and so on.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • If the operation fails, signin remains at its default value (default).

See Also


Base_GetTraceHint

Kind Function · Module Base · Version 3.0.0.4 · Deprecated

Description

This feature is deprecated. It is not available in the new interface either.

Base_GetTraceHint is a function that fills in the session hint information for log tracing into StovePCTraceHint and returns it. It must be called after initialization.

Declaration

csharp
public static Result Base_GetTraceHint(ref StovePCTraceHint traceHint);

Parameters

NameTypeRequiredDescription
traceHintref StovePCTraceHintYVariable to receive session hint information

Returns

TypeDescription
ResultQuery results. Success is determined by IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

StovePCTraceHint traceHint = default;
Result result = Base_GetTraceHint(ref traceHint);

if (result.IsSuccessful())
{
    // Please implement logic to log items such as `traceHint.sessionId`.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • If the operation fails, traceHint will remain at its default value (default).
  • This function and StovePCTraceHint are scheduled to be removed in a future version.

See Also


Base_GetUser

Kind Function · Module Base · Version 3.0.0.4

Description

Base_GetUser is a function that fills in the logged-in user's information into StovePCUser and returns it. It must be called after initialization.

Declaration

csharp
public static Result Base_GetUser(ref StovePCUser user);

Parameters

NameTypeRequiredDescription
userref StovePCUserYVariable to store the returned user information

Returns

TypeDescription
ResultQuery results. Success is determined by IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

StovePCUser user = default;
Result result = Base_GetUser(ref user);

if (result.IsSuccessful())
{
    // Please implement the logic using `user.nickname` and `user.gameUserId`.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • If the operation fails, user remains at its default value (default).

See Also


Base_GetVersion

Kind Function · Module Base · Version 3.0.0.4

Description

Base_GetVersion is a function that returns the SDK version string with version substituted into it.

Declaration

csharp
public static Result Base_GetVersion(ref string version, uint length);

Parameters

NameTypeRequiredDescription
versionref stringYVariable to receive the version string
lengthuintYThe buffer size (in characters) used internally to fill version

Returns

TypeDescription
ResultQuery results. Success is determined based on IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

string version = string.Empty;
Result result = Base_GetVersion(ref version, 64);

if (result.IsSuccessful())
{
    // Please implement the logic that uses "version."
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • None

See Also

  • None

Base_Initialize

Kind Function · Module Base · Version 3.0.0.4

Description

Base_Initialize is an asynchronous function that takes StovePCInitializeParam as an argument to initialize the SDK. The result is passed to the onFinished callback.

You cannot call any other SDK APIs before calling this function. To call it without initialization parameters, you must use Base_InitializeEx.

Before calling this function, you must first call a function from the Base_RestartAppIfNecessary series (such as Base_RestartAppIfNecessary, Base_RestartAppIfNecessaryAsync, Base_RestartAppIfNecessaryAsyncEx, etc.) to verify that it was executed via the launcher. If you do not call them first, the function will fail with error code NEED_STOVE_LAUNCHER (84).

Declaration

csharp
public static void Base_Initialize(StovePCInitializeParam initParam, OnInitializeFinished onFinished);

Parameters

NameTypeRequiredDescription
initParamStovePCInitializeParamYInitialization Parameters
onFinishedOnInitializeFinishedYCallback to receive the results

Returns

TypeDescription
voidNone

Callback

csharp
public delegate void OnInitializeFinished(CallbackResult result);
NameTypeDescription
resultCallbackResultInitialization Results

The callback runs in the thread that called Base_RunCallback(). It runs once for each such call.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMThere is a missing value among environment, gameId, and applicationKey in initParam.x
18ALREADY_INITIALIZEDIt is already initialized.x
84NEED_STOVE_LAUNCHERThe Base_RestartAppIfNecessary series function was not called first, or it was not executed via the launcherOThe game is closing because it is not running through the Stove PC client. Please relaunch the game from the client. If you do not have the client installed, please install it from the Stove website.[OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

void OnInitializeFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for the success case.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

StovePCInitializeParam initParam = new StovePCInitializeParam
{
    environment = "real",
    gameId = "your_game_id",
    applicationKey = "your_application_key"
};

Base_Initialize(initParam, OnInitializeFinished);

// Please handle the callback by calling it repeatedly within the game loop.
while (isRunning)
{
    Base_RunCallback();
}

Notes

  • To receive a callback, you must repeatedly call Base_RunCallback within the game loop. This function should not be called separately in the form of while(true); rather, it must be called every frame within the game loop.
  • When the process ends, you must call Base_UnInitialize.

See Also


Base_InitializeEx

Kind Function · Module Base · Version 3.4.1

Description

Unlike Base_Initialize, Base_InitializeEx does not accept StovePCInitializeParam; it only accepts a callback. The initialization result is passed to the onFinished callback in the same way.

This function reuses the initialization parameters cached by the Base_RestartAppIfNecessary series of functions (Base_RestartAppIfNecessary, Base_RestartAppIfNecessaryAsync, Base_RestartAppIfNecessaryAsyncEx2, etc.). You must call a function from the Base_RestartAppIfNecessary series before calling this function; otherwise, it will fail with error NEED_STOVE_LAUNCHER(84).

Declaration

csharp
public static void Base_InitializeEx(OnInitializeFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnInitializeFinishedYCallback to receive the results

Returns

TypeDescription
voidNone

Callback

csharp
public delegate void OnInitializeFinished(CallbackResult result);
NameTypeDescription
resultCallbackResultInitialization Results

The callback runs in the thread that called Base_RunCallback(). It runs once for each such call.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMThere are empty values among the environment, gameId, and applicationKey cached by the Base_RestartAppIfNecessary series of functions.x
18ALREADY_INITIALIZEDIt is already initialized.x
84NEED_STOVE_LAUNCHERThe Base_RestartAppIfNecessary series function was not called first, or the application was not launched via the launcher.OThe game is closing because it is not running through the Stove PC client. Please relaunch the game from the client. If you haven't installed the client, please install it from the Stove website.[OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

void OnInitializeFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for when the operation is successful.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

Base_InitializeEx(OnInitializeFinished);

Notes

See Also


Base_OpenExternalUrl

Kind Function · Module Base · Version 3.3.4

Description

Base_OpenExternalUrl is an asynchronous function that opens the specified URL externally. The result is passed to the onFinished callback.

Declaration

csharp
public static void Base_OpenExternalUrl(string url, OnOpenExternalUrlFinished onFinished);

Parameters

NameTypeRequiredDescription
urlstringYURL to open
onFinishedOnOpenExternalUrlFinishedYCallback to receive the results

Returns

TypeDescription
voidNone

Callback

csharp
public delegate void OnOpenExternalUrlFinished(CallbackResult result);
NameTypeDescription
resultCallbackResultCall Results

The callback runs in the thread that called Base_RunCallback(). It runs once for each such call.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check result.exceptionMessage.OA temporary problem has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

void OnOpenExternalUrlFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Base_OpenExternalUrl("https://www.onstove.com", OnOpenExternalUrlFinished);

Notes

  • onFinished is required. If it is not provided, it will be treated as INVALID_PARAM.
  • Opens the specified URL in your default browser. The game window remains open.
  • The callback runs in the thread that called Base_RunCallback().

See Also

  • None

Base_OverImmersionNotification

Kind Function · Module Base · Version 3.3.0

Description

Base_OverImmersionNotification is a function that registers a callback to be called when an over-engagement warning is triggered. Calling onFinished again replaces any previously registered callbacks of the same type with the new callback.

Declaration

csharp
public static void Base_OverImmersionNotification(OnOverImmersionFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnOverImmersionFinishedNA callback to be invoked when an excessive engagement warning is triggered. Passing null will unregister it.

Returns

TypeDescription
voidNone

Callback

csharp
public delegate void OnOverImmersionFinished(CallbackResult result, StovePCOverImmersion overImmersion);
NameTypeDescription
resultCallbackResultNotification Results
overImmersionStovePCOverImmersionWarning Regarding Excessive Engagement

The callback runs in the thread that called Base_RunCallback(). It is called whenever an immersion warning occurs.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

void OnOverImmersionFinished(CallbackResult callbackResult, StovePCOverImmersion overImmersion)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic to display warnings using `overImmersion.warningMessage` and similar methods.
    }
}

Base_OverImmersionNotification(OnOverImmersionFinished);

Notes

  • This notification may continue to function even in PCBANG_FREE state. You must maintain the callback registration regardless of the state.

See Also


Base_RestartAppIfNecessary

Kind Function · Module Base · Version 3.1.0

Description

Base_RestartAppIfNecessary is a synchronous function that returns StovePCInitializeParam and restarts the app if necessary. It immediately returns the value bool without a callback.

To process this asynchronously, you must use the Base_RestartAppIfNecessaryAsync series.

Declaration

csharp
public static bool Base_RestartAppIfNecessary(StovePCInitializeParam initParam);

Parameters

NameTypeRequiredDescription
initParamStovePCInitializeParamYInitialization Parameters

Returns

TypeDescription
boolIf true, the game will be relaunched via the Stove Protocol handler, so you must exit the game without executing the subsequent code. If false, the game is already running via the launcher, so proceed by calling Base_Initialize().

Error Codes

None. This function does not return Result/CallbackResult; if an exception occurs internally, the C# exception is rethrown as-is.

Example

csharp
using static Stove.PCSDK.Base;

StovePCInitializeParam initParam = new StovePCInitializeParam
{
    environment = "real",
    gameId = "your_game_id",
    applicationKey = "your_application_key"
};

bool restarted = Base_RestartAppIfNecessary(initParam);

Notes

See Also


Base_RestartAppIfNecessaryAsync

Kind Function · Module Base · Version 3.3.0

Description

Base_RestartAppIfNecessaryAsync accepts StovePCInitializeParam and a timeout (waitTimeMillisec), and, if necessary, restarts the app asynchronously and notifies you of the result via a callback.

If you need to specify whether to run the launcher, use Base_RestartAppIfNecessaryAsyncEx; if you want to pass the extension initialization parameters as a single structure, use Base_RestartAppIfNecessaryAsyncEx2.

Declaration

csharp
public static void Base_RestartAppIfNecessaryAsync(StovePCInitializeParam initParam, uint waitTimeMillisec, OnRestartAppIfNecessaryAsyncFinished onFinished);

Parameters

NameTypeRequiredDescription
initParamStovePCInitializeParamYInitialization Parameters
waitTimeMillisecuintYWait Time (milliseconds)
onFinishedOnRestartAppIfNecessaryAsyncFinishedYCallback to receive the results

Returns

TypeDescription
voidNone

Callback

csharp
public delegate void OnRestartAppIfNecessaryAsyncFinished(CallbackResult result, bool restartAppIfNecessary);
NameTypeDescription
resultCallbackResultCall Results
restartAppIfNecessaryboolThis value indicates whether to restart.

The callback runs in the thread that called Base_RunCallback(). It runs once for each such call.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check result.exceptionMessage.OThere was a temporary issue. Please try again. [OK]

If you receive the code below, you must exit the game. The game cannot continue normally.

  • 87 IPC_CONNECT_FAILED · 88 IPC_AES_KEY_NOT_RECEIVED · 89 IPC_TIMEOUT — You must restart the game via the Stove PC client
  • 253 UNMANAGED_EXCEPTION · 254 MANAGED_EXCEPTION — Since it is impossible to determine whether to restart, the game must be closed.

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

void OnRestartAppIfNecessaryAsyncFinished(CallbackResult callbackResult, bool restartAppIfNecessary)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

StovePCInitializeParam initParam = new StovePCInitializeParam
{
    environment = "real",
    gameId = "your_game_id",
    applicationKey = "your_application_key"
};

Base_RestartAppIfNecessaryAsync(initParam, 3000, OnRestartAppIfNecessaryAsyncFinished);

Notes

  • If you pass onFinished to null, only the restart will be handled without a callback.
  • To receive the callback, you must repeatedly call Base_RunCallback within the game loop.

See Also


Base_RestartAppIfNecessaryAsyncEx

Kind Function · Module Base · Version 3.4.0

Description

Base_RestartAppIfNecessaryAsyncEx is a version of Base_RestartAppIfNecessaryAsync with the launchLauncher parameter added. The caller can specify whether to run the launcher.

Declaration

csharp
public static void Base_RestartAppIfNecessaryAsyncEx(StovePCInitializeParam initParam, uint waitTimeMillisec, bool launchLauncher, OnRestartAppIfNecessaryAsyncFinished onFinished);

Parameters

NameTypeRequiredDescription
initParamStovePCInitializeParamYInitialization Parameters
waitTimeMillisecuintYWait Time (milliseconds)
launchLauncherboolYWhether the launcher is running
onFinishedOnRestartAppIfNecessaryAsyncFinishedYCallback to receive the results

Returns

TypeDescription
voidNone

Callback

csharp
public delegate void OnRestartAppIfNecessaryAsyncFinished(CallbackResult result, bool restartAppIfNecessary);
NameTypeDescription
resultCallbackResultCall Results
restartAppIfNecessaryboolThis value indicates whether to restart.

The callback runs in the thread that called Base_RunCallback(). It runs once for each such call.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check result.exceptionMessage.OThere was a temporary issue. Please try again. [OK]

If you receive the code below, you must exit the game. The game cannot proceed normally.

  • 87 IPC_CONNECT_FAILED · 88 IPC_AES_KEY_NOT_RECEIVED · 89 IPC_TIMEOUT — You must restart the game via the Stove PC client
  • 253 UNMANAGED_EXCEPTION · 254 MANAGED_EXCEPTION — Since it is impossible to determine whether to restart, the game must be closed.

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

void OnRestartAppIfNecessaryAsyncFinished(CallbackResult callbackResult, bool restartAppIfNecessary)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

StovePCInitializeParam initParam = new StovePCInitializeParam
{
    environment = "real",
    gameId = "your_game_id",
    applicationKey = "your_application_key"
};

Base_RestartAppIfNecessaryAsyncEx(initParam, 3000, true, OnRestartAppIfNecessaryAsyncFinished);

Notes

  • Exceptions that occur in a background thread are also passed to the callback as UNMANAGED_EXCEPTION (253) or MANAGED_EXCEPTION (254).
  • The only difference between Base_RestartAppIfNecessaryAsync and the signature is the single parameter launchLauncher.

See Also


Base_RestartAppIfNecessaryAsyncEx2

Kind Function · Module Base · Version 3.4.1

Description

This can be used regardless of whether it is linked to Steam. platformName is an optional field to be filled in only when linking with platforms other than Stove (such as Steam); if you are linking exclusively with Stove, leave the value unset or set it to an empty string (""), and it will function the same as Base_RestartAppIfNecessaryAsyncEx.

Base_RestartAppIfNecessaryAsyncEx2 is a version of Base_RestartAppIfNecessaryAsyncEx that combines initParam, waitTimeMillisec, and launchLauncher into a single StovePCInitializeParamEx2 structure. platformName and the reserved fields are also passed together via this structure.

Declaration

csharp
public static void Base_RestartAppIfNecessaryAsyncEx2(StovePCInitializeParamEx2 initParam, OnRestartAppIfNecessaryAsyncFinished onFinished);

Parameters

NameTypeRequiredDescription
initParamStovePCInitializeParamEx2YExtension Initialization Parameters
onFinishedOnRestartAppIfNecessaryAsyncFinishedYCallback to receive the results

Returns

TypeDescription
voidNone

Callback

csharp
public delegate void OnRestartAppIfNecessaryAsyncFinished(CallbackResult result, bool restartAppIfNecessary);
NameTypeDescription
resultCallbackResultCall Results
restartAppIfNecessaryboolThis value indicates whether to restart.

The callback runs in the thread that called Base_RunCallback(). It runs once for each such call.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred inside the C# wrapper (e.g., marshaling). Please check result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

If you see the code below, you must exit the game. The game cannot proceed normally.

  • 87 IPC_CONNECT_FAILED · 88 IPC_AES_KEY_NOT_RECEIVED · 89 IPC_TIMEOUT — You must restart the game via the Stove PC client
  • 253 UNMANAGED_EXCEPTION · 254 MANAGED_EXCEPTION — Since it is impossible to determine whether to restart, the game must be terminated.

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

void OnRestartAppIfNecessaryAsyncFinished(CallbackResult callbackResult, bool restartAppIfNecessary)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

StovePCInitializeParamEx2 initParam = new StovePCInitializeParamEx2
{
    environment = "real",
    gameId = "your_game_id",
    applicationKey = "your_application_key",
    waitTimeMillisec = 3000,
    launchLauncher = true,
    platformName = "your_platform_name"
};

Base_RestartAppIfNecessaryAsyncEx2(initParam, OnRestartAppIfNecessaryAsyncFinished);

Notes

See Also


Base_RunCallback

Kind Function · Module Base · Version 3.0.0.4

Description

Base_RunCallback is a function that executes pending asynchronous API callbacks on the current calling thread. Callbacks for all SDK asynchronous APIs (e.g., Base_Initialize) are executed on the thread that called this function, rather than on an internal SDK thread.

Pending callbacks are processed when they are called every frame (or periodically) within the game loop.

Declaration

csharp
public static void Base_RunCallback();

Parameters

None

Returns

TypeDescription
voidNone

Error Codes

None. This function does not return Result/CallbackResult; if an exception occurs internally, the C# exception is rethrown as-is.

Example

csharp
using static Stove.PCSDK.Base;

// Please call this every frame within the game loop.
void Update()
{
    Base_RunCallback();
}

Notes

  • This is not a function that is called separately in the form of while(true), but rather a function that must be called repeatedly within the game loop.
  • To specify a wait time, you must use Base_RunCallbackWithTimeout.

See Also


Base_RunCallbackWithTimeout

Kind Function · Module Base · Version 3.3.0

Description

Base_RunCallbackWithTimeout is a function that behaves similarly to Base_RunCallback, but allows you to specify a wait time using timeoutMillisec. The callback is executed on the thread that called this function.

Declaration

csharp
public static void Base_RunCallbackWithTimeout(uint timeoutMillisec);

Parameters

NameTypeRequiredDescription
timeoutMillisecuintYWait Time (milliseconds)

Returns

TypeDescription
voidNone

Error Codes

None. This function does not return Result/CallbackResult; if an exception occurs internally, the C# exception is rethrown as-is.

Example

csharp
using static Stove.PCSDK.Base;

Base_RunCallbackWithTimeout(100);

Notes

  • Just like Base_RunCallback, this must be called repeatedly within the game loop.

See Also


Base_SetGameProfile

Kind Function · Module Base · Version 3.0.0.4

Description

Base_SetGameProfile is a synchronous function that passes StovePCGameProfile to the SDK.

Declaration

csharp
public static Result Base_SetGameProfile(StovePCGameProfile gameProfile);

Parameters

NameTypeRequiredDescription
gameProfileStovePCGameProfileYGame Profiles to Configure

Returns

TypeDescription
ResultConfiguration results. Success is determined by IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check exceptionMessage.OA temporary problem has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

StovePCGameProfile gameProfile = new StovePCGameProfile
{
    worldId = "world_01",
    characterNumber = 12345L
};

Result result = Base_SetGameProfile(gameProfile);

if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for when a failure occurs.
}

Notes

  • None

See Also


Base_SetLanguage

Kind Function · Module Base · Version 3.1.0

Description

Base_SetLanguage is a synchronous function that sets the SDK language to the enumeration value StoveLanguage.

If you need to specify a language that is not listed here, use Base_SetLanguageEx.

When setting up a new integration, use Base_SetLanguageEx. This allows you to specify languages not listed in the enumeration as strings, so you can continue using them even if new languages are added later.

Declaration

csharp
public static Result Base_SetLanguage(StoveLanguage language);

Parameters

NameTypeRequiredDescription
languageStoveLanguageYLanguage to Set

Returns

TypeDescription
ResultConfiguration results. Success is determined by IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

Result result = Base_SetLanguage(StoveLanguage.ko);

if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • Base_SetLanguageEx accepts a string instead of a value from the StoveLanguage enumeration.

See Also


Base_SetLanguageEx

Kind Function · Module Base · Version 3.4.0

Description

Unlike Base_SetLanguage, Base_SetLanguageEx is a synchronous function that sets the language as a string rather than using the StoveLanguage enumeration. It is used when you need to set a language value that is not listed in StoveLanguage.

Declaration

csharp
public static Result Base_SetLanguageEx(string language);

Parameters

NameTypeRequiredDescription
languagestringYLanguage strings to configure

Returns

TypeDescription
ResultConfiguration results. Success is determined based on IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

Result result = Base_SetLanguageEx("ko");

if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • The only difference in the signature compared to Base_SetLanguage is that the parameter type is string rather than the StoveLanguage enumeration.

See Also


Base_ShutdownNotification

Kind Function · Module Base · Version 3.3.0

Description

Base_ShutdownNotification is a function that registers a callback to be invoked when a shutdown notification is sent to a user subject to shutdown. Calling onFinished again replaces any previously registered callbacks of the same type with the new callback.

Declaration

csharp
public static void Base_ShutdownNotification(OnShutdownFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnShutdownFinishedNA callback to be invoked when a shutdown notification occurs. Passing null unregisters the callback.

Returns

TypeDescription
voidNone

Callback

csharp
public delegate void OnShutdownFinished(CallbackResult result, StovePCShutdown shutdown);
NameTypeDescription
resultCallbackResultNotification Results
shutdownStovePCShutdownShutdown Notice

The callback runs in the thread that called Base_RunCallback(). It is called whenever a shutdown notification occurs.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). The error code is result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

void OnShutdownFinished(CallbackResult callbackResult, StovePCShutdown shutdown)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic to display prompts using `shutdown`, `shutdownMessage`, etc.
    }
}

Base_ShutdownNotification(OnShutdownFinished);

Notes

  • ShutdownNotification is not a feature exclusive to South Korea. If an account has been shut down, this callback will be triggered even from overseas.

See Also


Base_UnInitialize

Kind Function · Module Base · Version 3.0.0.4

Description

You must call this function before exiting the game. Since this function is responsible for calculating the total playtime and updating the server with that data, if you terminate the process without calling it, the playtime for that session will be missing.

Base_UnInitialize is a synchronous function that terminates the SDK. It clears the pending callback queue in disposal mode (registered user delegates are not called during this process), cleans up the callback container, and performs a native termination.

Declaration

csharp
public static Result Base_UnInitialize();

Parameters

None

Returns

TypeDescription
ResultExit result. Success is determined by IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). It is identified as exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

Result result = Base_UnInitialize();

if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • During the shutdown process, any callbacks that have already been registered are treated as being in "discard" mode, so the user's delegate is not called. In other words, you should not expect callbacks from asynchronous APIs registered immediately before shutdown.
  • Initialization pairs with Base_Initialize or Base_InitializeEx.
  • If there are multiple ways for the game to end (normal exit, exception exit, forced exit), ensure that this function is called in all cases. The playtime statistics are calculated at this point.

See Also


Base_VietnamAgeRatingNotification

Kind Function · Module Base · Version 3.4.1

Description

Base_VietnamAgeRatingNotification is a function that registers a callback to be invoked when a Vietnamese age rating overlay is required.

This callback is a one-time event and must be registered after rendering is complete.

Declaration

csharp
public static void Base_VietnamAgeRatingNotification(OnVietnamAgeRatingFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnVietnamAgeRatingFinishedNA callback to be invoked when a notification occurs. Passing null unregisters it.

Returns

TypeDescription
voidNone

Callback

csharp
public delegate void OnVietnamAgeRatingFinished(CallbackResult result, StovePCVietnamAgeRatingInfo vietnamAgeRatingInfo);
NameTypeDescription
resultCallbackResultNotification Results
vietnamAgeRatingInfoStovePCVietnamAgeRatingInfoAge Rating Overlay Information

The callback runs in the thread that called Base_RunCallback(). This is a one-time callback.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred inside the C# wrapper (e.g., marshaling). It is identified as result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

void OnVietnamAgeRatingFinished(CallbackResult callbackResult, StovePCVietnamAgeRatingInfo vietnamAgeRatingInfo)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic to draw an overlay using `vietnamAgeRatingInfo`.
    }
}

Base_VietnamAgeRatingNotification(OnVietnamAgeRatingFinished);

Notes

  • This callback must be registered after rendering is possible. If it is registered at a time when rendering is not yet ready—such as immediately after initialization—the overlay may not display properly.
  • You must register the "Excessive Engagement Alert" separately under Base_VietnamOverimmersionNotification.

See Also


Base_VietnamOverimmersionNotification

Kind Function · Module Base · Version 3.4.1

Description

Base_VietnamOverimmersionNotification is a function that registers a callback to be invoked when the Vietnam Immersion overlay needs to be displayed. Calling onFinished again replaces any previously registered callbacks of the same type with the new callback.

This callback is a one-time event and must be registered after the point at which rendering is possible.

Declaration

csharp
public static void Base_VietnamOverimmersionNotification(OnVietnamOverimmersionFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnVietnamOverimmersionFinishedNA callback to be invoked when a notification is triggered. Passing null will unregister it.

Returns

TypeDescription
voidNone

Callback

csharp
public delegate void OnVietnamOverimmersionFinished(CallbackResult result, StovePCVietnamOverimmersionInfo vietnamOverimmersionInfo);
NameTypeDescription
resultCallbackResultNotification Results
vietnamOverimmersionInfoStovePCVietnamOverimmersionInfoInformation Displayed by the "Over-Engagement" Overlay

The callback runs in the thread that called Base_RunCallback(). This is a one-time callback.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). It is identified as result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For possible error codes, see BaseSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;

void OnVietnamOverimmersionFinished(CallbackResult callbackResult, StovePCVietnamOverimmersionInfo vietnamOverimmersionInfo)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic to draw overlays using `vietnamOverimmersionInfo`.
    }
}

Base_VietnamOverimmersionNotification(OnVietnamOverimmersionFinished);

Notes

See Also


BaseSDKMethod

Kind Enum · Module Base · Version 3.0.0.4

Description

BaseSDKMethod is the value stored in result.methodCode within Result.methodCode and CallbackResult. It is used to indicate which API call occurred when the C# wrapper converts Managed exception to Result / CallbackResult.

The values are categorized by type as follows.

  • Life Cycle: Initialization · Termination · Version Lookup
  • Authentication/Token: View and Renew Access Tokens
  • User/Game Information: User · GDS · View Login Information
  • Language
  • Notices/Regulations: Excessive Gaming · Shutdown · Vietnam Regulatory Notice
  • Logs/Diagnostics: Log Transmission, Trace Hints, Game Profiles
  • App Restart/External Links: Launcher Restart, External URLs

Among these, values prefixed with INTERNAL_ are for internal SDK use only and have been excluded from the table below.

Values prefixed with INTERNAL_ are for internal use only and have therefore been excluded from the table below. You will not need to handle these values directly in the game code.

Declaration

csharp
public enum BaseSDKMethod
{
    INITIALIZE = 1,
    UNINITIALIZE = 2,
    // ... See the "Values" table below
    GET_TRANSLATE_LANGUAGE = 119,
};

Enum Values

Life Cycle

CodeNameDescription
1INITIALIZEBase_Initialize · Base_InitializeEx
2UNINITIALIZEBase_UnInitialize
5GET_VERSIONBase_GetVersion

Authentication/Token

CodeNameDescription
64GET_ACCESS_TOKENBase_GetAccessToken
65ACCESS_TOKEN_RENEWEDBase_AccessTokenRenewed
112FORCE_REFRESH_TOKENNo corresponding public API (for internal SDK use only)
113ACCESS_TOKEN_RENEWED_TO_PRIVATENo corresponding public API (for internal SDK use only)
114GET_TOKEN_TO_PRIVATENo corresponding public API (for internal SDK use only)

User/Game Information

CodeNameDescription
66GET_USERBase_GetUser
73GET_GDSBase_GetGds
74GET_SIGNINBase_GetSignin
115GET_ENV_TOKEN_TO_PRIVATENo corresponding public API (for internal SDK use only)
116GET_GAMEID_TO_PRIVATENo corresponding public API (for internal SDK use only)
117GET_MEMBERNO_PRIVATENo corresponding public API (for internal SDK use only)
118GET_PUBLIC_IPNo corresponding public API (internal to the SDK only)

Language

CodeNameDescription
67SET_LANGUAGEBase_SetLanguage · Base_SetLanguageEx
119GET_TRANSLATE_LANGUAGENo corresponding public API (for internal SDK use only)

Notices/Regulations

CodeNameDescription
68OVER_IMMERSION_NOTIFICATIONBase_OverImmersionNotification
69SHUTDOWN_NOTIFICATIONBase_ShutdownNotification
79VIETNAM_AGE_RATING_NOTIFICATIONBase_VietnamAgeRatingNotification
80VIETNAM_OVER_IMMERSION_NOTIFICATIONBase_VietnamOverimmersionNotification

Log/Diagnostics

CodeNameDescription
70LOG_ADDBase_LogAdd (Deprecated) — There is no corresponding function for the currently exposed header.
71GET_TRACE_HINTBase_GetTraceHint
72SET_GAME_PROFILEBase_SetGameProfile

App Restart/External Connection

CodeNameDescription
75RESTART_APP_IF_NECESSARYBase_RestartAppIfNecessary
76RESTART_APP_IF_NECESSARY_ASYNCBase_RestartAppIfNecessaryAsync series (including Ex and Ex2)
77OPEN_EXTERNAL_URLBase_OpenExternalUrl
78GET_CLOUD_SAVING_PATHBase_GetCloudSavingPath — Exclusive to StoreIndie

Unused numbers

CodeNameDescription
6–63Not in use (unused number)
81–95Not in use (unused number)

Internal-use-only values (INTERNAL_SEND_81PLUG, INTERNAL_UPDATE_81PLUG, INTERNAL_SET_PLAYTIME_REPORT, INTERNAL_OPERATOR_REPORT_PLAYTIME, INTERNAL_GAME_EXIT_REPORT_PLAYTIME, INTERNAL_FILE_SAVE_UNSET_PLAYTIME, INTERNAL_FAILED_PLAYTIME_TRANSFERS, INTERNAL_OPERATOR_REPORT_CONCURRENT_USER, INTERNAL_SERVER_CONFIG, INTERNAL_GDS_INFO, INTERNAL_GAME_CHECKER_LOGIN, INTERNAL_ONSTOVE_LOGIN, INTERNAL_FUNCTION, INTERNAL_RENEW_GUID_TOKEN, INTERNAL_RENEW_TOKEN, INTERNAL_CONVERT_ONLINE_TOKEN, INTERNAL_TRANSLATE_LANGUAGE, INTERNAL_GET_GAMEMETA, for a total of 18) have been excluded from the table.

Example

csharp
using static Stove.PCSDK.Base;

// Result.methodCode stores the value of this enumeration as a uint.
void CheckMethod(Result result)
{
    if (result.methodCode == Convert.ToUInt32(BaseSDKMethod.INITIALIZE))
    {
        // These are the results of the calls to Base_Initialize and Base_InitializeEx.
    }
}

Notes

  • GET_TOKEN_TO_PRIVATE, GET_ENV_TOKEN_TO_PRIVATE, GET_GAMEID_TO_PRIVATE, GET_MEMBERNO_PRIVATE, GET_PUBLIC_IP, FORCE_REFRESH_TOKEN, ACCESS_TOKEN_RENEWED_TO_PRIVATE, GET_TRANSLATE_LANGUAGE do not contain INTERNAL in their names, but no public Base_ API that uses this value within BaseAPI.cs has been identified. Values 112–119 in the C++ source header (BaseSDKResult.h) are all explicitly marked with the comment “Internal method,” confirming that these values are used exclusively within the SDK and have no corresponding public API.
  • There is no public API corresponding to LOG_ADD(70). Although the C++ source header contains a comment for Base_LogAdd (deprecated), there is no function declaration for Base_LogAdd in any of the currently public headers. This is a deprecated API where only the code value remains for backward compatibility.

See Also


BaseSDKResultCode

Kind Result Code · Module Base · Version 3.0.0.4

Description

BaseSDKResultCode is the value stored in Result.resultCode. 0 (SUCCESS) indicates success; any other value indicates the cause of failure. Result.IsSuccessful() checks whether resultCode == 0 is true.

If an exception occurs inside the C# wrapper (such as a marshaling error), it always returns a Result filled with MANAGED_EXCEPTION(254).

Declaration

csharp
public enum BaseSDKResultCode
{
    SUCCESS = 0,
    FAIL = 1,
    // ... See the "Values" table below
    IPC_TIMEOUT = 89,
}

Enum Values

Success/General Error

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
1FAILGeneral Failurex
2INVALID_CONFIGInvalid setting (unused code)x
3INVALID_LOG_LEVELInvalid log level value (unused code)x
4INVALID_LOG_PATHInvalid log path (unused code)x
5INVALID_PARAMThe parameter value is incorrect. Please check the parameters in the calling code.x
6–15Not in use (unassigned number)x

Initial State

CodeNameDescriptionShow to UserIn-Game Message
16BASE_NOT_INITIALIZEDThe SDK has not been initialized. A prior call to Base_Initialize is required.x
17NOT_INITIALIZEDNot initializedx
18ALREADY_INITIALIZEDAlready initialized. Duplicate initialization calls must be removed.x
29ASYNC_OPERATION_IN_PROGRESSAn asynchronous operation is already in progress. You must wait for the callback from the previous call before calling again.x
30BASE_UNINITIALIZEDThe SDK is closedx

Authentication/Token

CodeNameDescriptionShow to UserIn-Game Message
19INVALID_ACCESS_TOKENInvalid access tokenOYour login session has expired. Please close the game and restart it. [OK]
20NULL_TOKEN_ENTITYNo token entities (unused code)x

Response/Communication

CodeNameDescriptionShow to UserIn-Game Message
21NULL_ENTITYNo response entity (unused code)x
22HTTP_ERRORHTTP Communication ErrorOThe network connection is unstable. Please check your network status and try again. [OK]
23RESPONSE_ERRORResponse Processing ErrorOThe network connection is unstable. Please check your network status and try again. [OK]
24RESPONSE_INVALID_CODEInvalid response codeOThe network connection is unstable. Please check your network status and try again. [OK]
25RESPONSE_VALUE_IS_NULLNo response valueOThe network connection is unstable. Please check your network status and try again. [OK]
26RESPONSE_INVALID_VALUE_FORMATThe response value is in an invalid format.OThe network connection is unstable. Please check your network status and try again. [OK]
249NETWORK_TRANSPORT_ERRORNetwork transmission error. externalError contains a native error code from the HTTP backend (e.g., WinHTTP 12002/12007/12029).x

81Plug Integration

CodeNameDescriptionShow to UserIn-Game Message
27LOG_81PLUG_ERROR81Plug Log Processing Error (Unused Code)x
28UPDATE_81PLUG_FEED_ERROR81Plug Feed Update Error (Unused Code)x

Country/Regulations

CodeNameDescriptionShow to UserIn-Game Message
31NOT_SUPPORTED_COUNTRYCountries Not Supportedx

For Internal Use Only

CodeNameDescriptionShow to UserIn-Game Message
33POPUP_NOT_CREATEDFor internal maintenance only — Close without creating a popup (for onDestroy only). The wrapper intercepts the call and does not invoke the user callback.x
32Not in use (unused number)x
34–79Not in use (unassigned number)x

Language/GDS

CodeNameDescriptionShow to UserIn-Game Message
80LANGUAGE_NOT_SETLanguage not set (unused code)x
81EMPTY_TRANSLATED_STRINGThe translated string is empty (unused code)x
82NOT_FOUND_REQUIRED_INFORMATIONThe information you are looking for cannot be found.x
83INVALID_GDS_INFOGDS Information Is Incorrect (Unused Code)x

Launcher Integration

CodeNameDescriptionShow to UserIn-Game Message
84NEED_STOVE_LAUNCHERStove Launcher is requiredOThe game is closing because it is not running through the Stove PC client. Please launch the game again from the client. If you do not have the client installed, please install it from the Stove website.[OK]
85LAUNCHER_FAILED_CREATE_REQUIREDFailed to create launcher (unused code)x
86RENEW_TOKEN_MAX_RETRY_COUNT_EXCEEDEDThe number of retries for token renewal has been exceeded.OThe network connection is unstable. Please check your network status and try again. [OK]
87IPC_CONNECT_FAILEDFailed to establish an IPC connection with the launcherOThe game is closing because it is not running through the Stove PC client. Please launch the game again from the client. If you do not have the client installed, please install it from the Stove website.[OK]
88IPC_AES_KEY_NOT_RECEIVEDIPC AES Key Not ReceivedOThe game is closing because it is not running through the Stove PC client. Please launch the game again from the client. If you do not have the client installed, please install it from the Stove website.[OK]
89IPC_TIMEOUTIPC TimeoutOThe game is closing because it is not running through the Stove PC client. Please launch the game again from the client. If you do not have the client installed, please install it from the Stove website.[OK]
90–248Not in use (unused number)x

For C# Wrappers Only

CodeNameDescriptionShow to UserIn-Game Message
250JSON_EXCEPTIONAn exception occurred while processing JSONOThe network connection is unstable. Please check your network status and try again. [OK]
251PCSDK_DLL_NOT_FOUNDNative PCSDK DLL not found (unused code)x
252NOT_IMPLEMENTEDUnimplemented Features (Unused Code)x
253UNMANAGED_EXCEPTIONNative (unmanaged) exception occurredOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONException occurred within the C# wrapper (e.g., marshaling)OA temporary issue has occurred. Please try again. [OK]
255UNKNOWN_ERRORUnknown Error (Unused Code)x

If you receive the code below, you must exit the game. The game cannot proceed normally.

  • 19 INVALID_ACCESS_TOKEN — Your login session has expired; please close the game and restart it.
  • 84 NEED_STOVE_LAUNCHER — You'll need to restart the game after it closes.
  • 87 IPC_CONNECT_FAILED — You'll need to restart the game after it closes.
  • 88 IPC_AES_KEY_NOT_RECEIVED — You will need to restart the game after it closes
  • 89 IPC_TIMEOUT — You will need to restart the game after it ends

If you run the game executable file directly without the Stove PC client, error 87(IPC_CONNECT_FAILED) or 89(IPC_TIMEOUT) will occur. In this case, you must close the game; once closed, the Stove launcher will launch automatically.

Example

csharp
using static Stove.PCSDK.Base;

Result result = Base_SetGameProfile(gameProfile);

if (result.IsSuccessful())
{
    // Please implement the logic for when the operation is successful.
}
else if (result.resultCode == Convert.ToUInt32(BaseSDKResultCode.BASE_NOT_INITIALIZED))
{
    // Please implement the logic for calling the initialization function first.
}
else
{
    // Please implement the logic for other failure scenarios.
}

Notes

  • POPUP_NOT_CREATED(33) is used in the pop-up's internal cleanup path rather than in the SDK Legacy API itself, and is not passed to the user callback.

See Also


CallbackResult

Kind Struct · Module Base · Version 3.0.0.4

Description

CallbackResult is a structure passed as the first argument to callbacks by the SDK Legacy API—such as Base_Initialize and Base_RestartAppIfNecessaryAsync. The actual success or failure is determined by the internal result field.

Declaration

csharp
public struct CallbackResult
{
    public Result result;
    public string errorMessage;
    public int externalError;
}

Members

NameTypeDescription
resultResultA struct containing the result code. These are lowercase fields.
errorMessagestringError Message
externalErrorintExternal (such as native transport layer) error code. Example: When BaseSDKResultCode.NETWORK_TRANSPORT_ERROR(249) is specified, a WinHTTP native error code is included.

Example

csharp
using static Stove.PCSDK.Base;

void OnInitializeFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

Notes

  • The result is callbackResult.result.IsSuccessful(). result is a lowercase field, and IsSuccessful() is a method.
  • The IStoveCallbackResult of the new C# interface (Stove.PCSDK.V3) uses the Result property (capitalized), so its notation differs from that of the old interface.

See Also


DiscountType

Kind Enum · Module IAP · Version 3.0.0.4

Description

Stored in the StovePCProduct.discountType / StovePCProductEx.discountType fields, this indicates whether the discount method (isDiscount == true) is a percentage or a fixed amount when the product is on sale.

Declaration

csharp
public enum DiscountType
{
    NONE = 0,
    FIXED_RATE = 1,
    FLAT_RATE,
};

Enum Values

CodeNameDescription
0NONEThe discount has not been applied.
1FIXED_RATEThis is a fixed-rate discount.
2FLAT_RATEThis is a flat-rate discount.

Example

csharp
using static Stove.PCSDK.IAP;

void CheckDiscount(StovePCProduct product)
{
    if (product.isDiscount && product.discountType == DiscountType.FIXED_RATE)
    {
        // Please implement the logic to display a fixed-rate discount. `discountTypeValue` represents the discount rate.
    }
}

Notes

  • It is used in conjunction with the discountTypeValue field. A value of FIXED_RATE indicates a percentage, while a value of FLAT_RATE indicates a fixed amount.

See Also


IAP_CloseAllPopups

Kind Function · Module IAP · Version 3.1.3

Description

If any web view pop-ups triggered by the payment feature (such as purchase, payment, terms and conditions agreement, or game withdrawal) are open, close them all.

It must be called after IAP_Initialize.

Declaration

csharp
public static Result IAP_CloseAllPopups()

Parameters

None

Returns

TypeDescription
ResultHere are the results of the call. Check result.IsSuccessful() to see if it was successful.

Error Codes

The value of Result.methodCode is Convert.ToUInt32(IAPSDKMethod.CLOSE_ALL_POPUPS).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDIAP is not initializedx
80VIEWUI_NOT_INITIALIZEDThe WebView of the popup to be closed has not been initializedx
89WEBVIEW_CLOSE_ALL_FAILFailed to close all open pop-upsx
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred inside the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OThere was a temporary issue. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.IAP;

Result result = IAP_CloseAllPopups();
if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • This function is synchronous and does not accept callbacks.
  • Use this when you need to close all open pop-ups at once, such as when exiting a game.

See Also


IAP_ConfirmPurchase

Kind Function · Module IAP · Version 3.0.0.4

Description

Confirms the purchase for the transaction specified as transactionMasterNo. Passes StovePCPurchaseResult.transactionMasterNumber, which was received via the callback from IAP_StartPurchase / IAP_StartPurchaseEx.

It must be called after IAP_Initialize.

Declaration

csharp
public static void IAP_ConfirmPurchase(long transactionMasterNo, OnConfirmPurchaseFinished onFinished)

Parameters

NameTypeRequiredDescription
transactionMasterNolongYThis is the master number of the transaction to be confirmed.
onFinishedOnConfirmPurchaseFinishedYThis is the callback that will receive the confirmation result.

Returns

None

Callback

csharp
public delegate void OnConfirmPurchaseFinished(CallbackResult callbackResult, bool status, StovePCPurchasedProduct[] purchasedProducts, StovePCChargeInfo[] chargeInfos);
NameTypeDescription
callbackResultCallbackResultHere are the results of the call. Check callbackResult.result.IsSuccessful() to see if it was successful.
statusboolThe status is "Pending Confirmation."
purchasedProductsStovePCPurchasedProduct[]This is a list of the items that were actually delivered.
chargeInfosStovePCChargeInfo[]This is a list of the goods deducted as payment for the purchase.

This callback runs in the thread that called Base_RunCallback(). It runs once per call.

Error Codes

The value of CallbackResult.result.methodCode is Convert.ToUInt32(IAPSDKMethod.CONFIRM_PURCHASE).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDIAP has not been initialized. You must call IAP_Initialize first.x
21NULL_ENTITYUnable to process the request because language settings could not be verified.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.IAP;

IAP_ConfirmPurchase(transactionMasterNumber, OnConfirmPurchaseFinished);

void OnConfirmPurchaseFinished(CallbackResult callbackResult, bool status, StovePCPurchasedProduct[] purchasedProducts, StovePCChargeInfo[] chargeInfos)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

Notes

  • transactionMasterNo is obtained from the callback result of the IAP_StartPurchase series API.
  • You must call Base_RunCallback() repeatedly within the game loop for the callback to be passed.

See Also


IAP_FetchInventory

Kind Function · Module IAP · Version 3.0.0.4

Description

Displays a list of the items in the user's inventory.

It must be called after IAP_Initialize.

Declaration

csharp
public static void IAP_FetchInventory(OnFetchInventoryFinished onFinished)

Parameters

NameTypeRequiredDescription
onFinishedOnFetchInventoryFinishedYThis is the callback that will receive the query results.

Returns

None

Callback

csharp
public delegate void OnFetchInventoryFinished(CallbackResult callbackResult, StovePCInventoryItem[] inventoryItems);
NameTypeDescription
callbackResultCallbackResultHere are the results of the call. Check callbackResult.result.IsSuccessful() to see if it was successful.
inventoryItemsStovePCInventoryItem[]This is the list of inventory items found.

This callback runs in the thread that called Base_RunCallback(). It runs once per call.

Error Codes

The value of CallbackResult.result.methodCode is Convert.ToUInt32(IAPSDKMethod.FETCH_INVENTORY).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDIAP has not been initialized. You must first call IAP_Initialize.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary problem has occurred. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.IAP;

IAP_FetchInventory(OnFetchInventoryFinished);

void OnFetchInventoryFinished(CallbackResult callbackResult, StovePCInventoryItem[] inventoryItems)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

Notes

  • You must repeatedly call Base_RunCallback() within the game loop for the callback to be passed.

See Also


IAP_FetchProducts

Kind Function · Module IAP · Version 3.0.0.4 · Deprecated

Description

Do not use this default template. Use IAP_FetchProductsEx instead.

Retrieves a list of products within the category and page range specified by productParam.

It must be called after IAP_Initialize.

Declaration

csharp
public static void IAP_FetchProducts(StovePCFetchProductParam productParam, OnFetchProductsFinished onFinished)

Parameters

NameTypeRequiredDescription
productParamStovePCFetchProductParamYThese are the criteria for the categories and pages to be retrieved.
onFinishedOnFetchProductsFinishedYThis is the callback that will receive the query results.

Returns

None

Callback

csharp
public delegate void OnFetchProductsFinished(CallbackResult callbackResult, StovePCProduct[] products);
NameTypeDescription
callbackResultCallbackResultHere are the results of the call. Check callbackResult.result.IsSuccessful() to see if it was successful.
productsStovePCProduct[]Here is the list of products found.

This callback runs in the thread that called Base_RunCallback(). It runs once per call.

Error Codes

The value of CallbackResult.result.methodCode is Convert.ToUInt32(IAPSDKMethod.FETCH_PRODUCTS).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDIAP has not been initialized. You must call IAP_Initialize first.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.IAP;

StovePCFetchProductParam param = new StovePCFetchProductParam();
param.categoryId = "YOUR_CATEGORY_ID";
param.pageNumber = 1;
param.pageSize = 20;

IAP_FetchProducts(param, OnFetchProductsFinished);

void OnFetchProductsFinished(CallbackResult callbackResult, StovePCProduct[] products)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for when the operation is successful.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

Notes

  • Always use IAP_FetchProductsEx for actual integration. The availability code (purchaseAvailabilityCode) is also only available in the Ex variant.
  • You must call Base_RunCallback() repeatedly within the game loop for the callback to be passed.

See Also


IAP_FetchProductsEx

Kind Function · Module IAP · Version 3.4.1

Description

It returns StovePCProductEx[], which has the same input parameters (productParam) as IAP_FetchProducts but includes the purchaseAvailabilityCode field in the query results. It differs from IAP_FetchProducts—which returns StovePCProduct[]—only in the return type.

It must be called after IAP_Initialize.

Declaration

csharp
public static void IAP_FetchProductsEx(StovePCFetchProductParam productParam, OnFetchProductsExFinished onFinished)

Parameters

NameTypeRequiredDescription
productParamStovePCFetchProductParamYThese are the criteria for the categories and pages to be retrieved.
onFinishedOnFetchProductsExFinishedYThis is the callback that receives the query results.

Returns

None

Callback

csharp
public delegate void OnFetchProductsExFinished(CallbackResult callbackResult, StovePCProductEx[] products);
NameTypeDescription
callbackResultCallbackResultHere are the results of the call. Check callbackResult.result.IsSuccessful() to see if it was successful.
productsStovePCProductEx[]Here is the list of products found.

This callback runs in the thread that called Base_RunCallback(). It runs once per call.

Error Codes

The value of CallbackResult.result.methodCode is Convert.ToUInt32(IAPSDKMethod.FETCH_PRODUCTS).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDIAP has not been initialized. You must call IAP_Initialize first.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.IAP;

StovePCFetchProductParam param = new StovePCFetchProductParam();
param.categoryId = "YOUR_CATEGORY_ID";
param.pageNumber = 1;
param.pageSize = 20;

IAP_FetchProductsEx(param, OnFetchProductsExFinished);

void OnFetchProductsExFinished(CallbackResult callbackResult, StovePCProductEx[] products)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

Notes

  • If purchaseAvailabilityCode is not needed, use IAP_FetchProducts.
  • You must call Base_RunCallback() repeatedly within the game loop for the callback to be passed.

See Also


IAP_FetchShopCategories

Kind Function · Module IAP · Version 3.0.0.4

Description

Retrieves the list of categories registered in the store. The retrieved category ID is used in StovePCFetchProductParam.categoryId of IAP_FetchProducts / IAP_FetchProductsEx.

It must be called after IAP_Initialize.

Declaration

csharp
public static void IAP_FetchShopCategories(OnFetchShopCategoriesFinished onFinished)

Parameters

NameTypeRequiredDescription
onFinishedOnFetchShopCategoriesFinishedYThis is the callback that will receive the query results.

Returns

None

Callback

csharp
public delegate void OnFetchShopCategoriesFinished(CallbackResult callbackResult, StovePCShopCategory[] shopCategories);
NameTypeDescription
callbackResultCallbackResultHere are the results of the call. Check callbackResult.result.IsSuccessful() to see if it was successful.
shopCategoriesStovePCShopCategory[]Here is a list of the categories found.

This callback runs in the thread that called Base_RunCallback(). It runs once per call.

Error Codes

The value of CallbackResult.result.methodCode is Convert.ToUInt32(IAPSDKMethod.FETCH_SHOP_CATEGORIES).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDIAP has not been initialized. You must call IAP_Initialize first.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.IAP;

IAP_FetchShopCategories(OnFetchShopCategoriesFinished);

void OnFetchShopCategoriesFinished(CallbackResult callbackResult, StovePCShopCategory[] shopCategories)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

Notes

  • You must call Base_RunCallback() repeatedly within the game loop for the callback to be passed.

See Also


IAP_FetchTermsAgreement

Kind Function · Module IAP · Version 3.0.0.4

Description

Checks whether the user has agreed to the terms and conditions. Depending on how option operates, a web view pop-up for agreeing to the terms and conditions may appear.

It must be called after IAP_Initialize.

Declaration

csharp
public static void IAP_FetchTermsAgreement(StovePCTermsOption option, OnFetchTermsAgreementFinished onFinished)

Parameters

NameTypeRequiredDescription
optionStovePCTermsOptionYThis describes how the terms and conditions consent pop-up works, as well as its position and size.
onFinishedOnFetchTermsAgreementFinishedYThis is the callback that will receive the query results.

Returns

None

Callback

csharp
public delegate void OnFetchTermsAgreementFinished(CallbackResult callbackResult, bool agreed, string url);
NameTypeDescription
callbackResultCallbackResultHere are the results of the call. Check callbackResult.result.IsSuccessful() to see if it was successful.
agreedboolWhether you have agreed to the terms and conditions.
urlstringThis is the URL for the Terms and Conditions consent web view.

This callback runs in the thread that called Base_RunCallback(). It runs once per call.

Error Codes

The value of CallbackResult.result.methodCode is Convert.ToUInt32(IAPSDKMethod.FETCH_TERMS_AGREEMENT).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDIAP has not been initialized. You must call IAP_Initialize first.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView that displays the terms and conditions consent pop-upx
82WEBVIEW_CREATE_FAILFailed to create a web view for the Terms of Service agreement pop-upx
83WEBVIEW_LOAD_URL_FAILUnable to load the page in the Terms of Service consent pop-up web viewx
87WEBVIEW_CREATE_COOKIE_FAILThe host address on the Terms and Conditions agreement screen could not be found.OYou must agree to the terms and conditions to complete your purchase. We were unable to load the terms and conditions screen. Please try again. [OK]
89WEBVIEW_CLOSE_ALL_FAILFailed to close all previously open pop-upsx
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;
using static Stove.PCSDK.IAP;

StovePCTermsOption option = new StovePCTermsOption();
option.operation = StovePCTermsOperation.WITH_WEBVIEW;
option.webviewMode = WebViewMode.INTERNAL;
option.webviewWidth = 800;
option.webviewHeight = 600;

IAP_FetchTermsAgreement(option, OnFetchTermsAgreementFinished);

void OnFetchTermsAgreementFinished(CallbackResult callbackResult, bool agreed, string url)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

  • If you need to detect when the popup closes (destroy) separately, use IAP_FetchTermsAgreementEx.
  • You must call Base_RunCallback() repeatedly within the game loop for the callback to be passed.

See Also


IAP_FetchTermsAgreementEx

Kind Function · Module IAP · Version 3.3.4

Description

Just like IAP_FetchTermsAgreement, it checks whether the terms and conditions have been accepted, but it also receives an additional callback, onDestroy, which is triggered when the terms and conditions pop-up is closed. The remaining parameters and the result callback (onFinished) are the same as those for IAP_FetchTermsAgreement.

It must be called after IAP_Initialize.

Declaration

csharp
public static void IAP_FetchTermsAgreementEx(StovePCTermsOption option, OnFetchTermsAgreementFinished onFinished, OnIAPPopupDestroyFinished onDestroy)

Parameters

NameTypeRequiredDescription
optionStovePCTermsOptionYThis describes how the terms and conditions consent pop-up works, as well as its position and size.
onFinishedOnFetchTermsAgreementFinishedYThis is the callback that will receive the query results.
onDestroyOnIAPPopupDestroyFinishedNThis is a callback that is triggered when the terms and conditions consent pop-up closes.

Returns

None

Callback

csharp
public delegate void OnFetchTermsAgreementFinished(CallbackResult callbackResult, bool agreed, string url);
public delegate void OnIAPPopupDestroyFinished(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultHere are the results of the call. Check callbackResult.result.IsSuccessful() to see if it was successful.
agreedboolThis indicates whether you agree to the terms and conditions provided in onFinished.
urlstringThis is the URL of the web view for agreeing to the terms and conditions, which is passed to onFinished.

Both callbacks run on the thread that called Base_RunCallback(). onFinished is called when the query is complete, and onDestroy is called when the terms and conditions pop-up is closed.

Error Codes

The value of CallbackResult.result.methodCode is Convert.ToUInt32(IAPSDKMethod.FETCH_TERMS_AGREEMENT).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDIAP has not been initialized. You must call IAP_Initialize first.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView to display the terms and conditions consent pop-upx
82WEBVIEW_CREATE_FAILFailed to create a web view for the Terms of Service agreement pop-upx
83WEBVIEW_LOAD_URL_FAILUnable to load the page in the Terms of Service consent pop-up web viewx
87WEBVIEW_CREATE_COOKIE_FAILThe host address on the Terms and Conditions agreement screen could not be found.OYou must agree to the terms and conditions to make a purchase. We were unable to load the terms and conditions screen. Please try again. [OK]
89WEBVIEW_CLOSE_ALL_FAILFailed to close all previously open pop-upsx
90WEBVIEW_CLOSE_FAILFailed to close the popup (passed to the onDestroy callback)x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OThere was a temporary issue. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;
using static Stove.PCSDK.IAP;

StovePCTermsOption option = new StovePCTermsOption();
option.operation = StovePCTermsOperation.WITH_WEBVIEW;
option.webviewMode = WebViewMode.INTERNAL;
option.webviewWidth = 800;
option.webviewHeight = 600;

IAP_FetchTermsAgreementEx(option, OnFetchTermsAgreementFinished, OnIAPPopupDestroyFinished);

void OnFetchTermsAgreementFinished(CallbackResult callbackResult, bool agreed, string url)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

void OnIAPPopupDestroyFinished(CallbackResult callbackResult)
{
    // Please implement the logic that runs when the terms and conditions consent pop-up is closed.
}

Notes

  • If you don't need to detect when the pop-up closes, use IAP_FetchTermsAgreement.
  • You must call Base_RunCallback() repeatedly within the game loop for the callback to be passed.

See Also


IAP_FetchVoidedPurchases

Kind Function · Module IAP · Version 3.0.0.4 · Deprecated

Description

The refund inquiry feature has been deprecated. It is not available in the new interface. It remains available only in the existing interface.

View a list of purchases that have been canceled (refunded) on the marketplace.

It must be called after IAP_Initialize.

Declaration

csharp
public static void IAP_FetchVoidedPurchases(OnFetchVoidedPurchasesFinished onFinished)

Parameters

NameTypeRequiredDescription
onFinishedOnFetchVoidedPurchasesFinishedYThis is the callback that will receive the query results.

Returns

None

Callback

csharp
public delegate void OnFetchVoidedPurchasesFinished(CallbackResult callbackResult, StovePCVoidedPurchase[] voidedPurchase);
NameTypeDescription
callbackResultCallbackResultHere are the results of the call. Check callbackResult.result.IsSuccessful() to see if it was successful.
voidedPurchaseStovePCVoidedPurchase[]This is a list of canceled purchases.

This callback runs in the thread that called Base_RunCallback(). It runs once per call.

Error Codes

The value of CallbackResult.result.methodCode is Convert.ToUInt32(IAPSDKMethod.FETCH_VOIDED_PURCHASES).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDIAP has not been initialized. You must call IAP_Initialize first.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary problem has occurred. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.IAP;

IAP_FetchVoidedPurchases(OnFetchVoidedPurchasesFinished);

void OnFetchVoidedPurchasesFinished(CallbackResult callbackResult, StovePCVoidedPurchase[] voidedPurchase)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

  • The IAP_FetchVoidedPurchasesEx feature, which allows you to filter and view results by market, is not currently available in the SDK.
  • You must call Base_RunCallback() repeatedly within the game loop for the callback to be passed.

See Also


IAP_FetchVoidedPurchasesEx

Kind Function · Module IAP · Version 3.4.1 · Deprecated

Description

This function is not currently available in the SDK. The refund inquiry feature itself has been deprecated.

Unlike IAP_FetchVoidedPurchases, you can specify the market to query using the marketType parameter, and it returns StovePCVoidedPurchasesEx[], which includes additional fields such as member ID and GUID in the query results.

It must be called after IAP_Initialize.

Declaration

csharp
public static void IAP_FetchVoidedPurchasesEx(StovePCVoidedPurchasesMarketType marketType, OnFetchVoidedPurchasesExFinished onFinished)

Parameters

NameTypeRequiredDescription
marketTypeStovePCVoidedPurchasesMarketTypeYThis is the market you want to view.
onFinishedOnFetchVoidedPurchasesExFinishedYThis is the callback that receives the query results.

Returns

None

Callback

csharp
public delegate void OnFetchVoidedPurchasesExFinished(CallbackResult callbackResult, StovePCVoidedPurchasesEx[] voidedPurchase);
NameTypeDescription
callbackResultCallbackResultHere are the results of the call. Check callbackResult.result.IsSuccessful() to see if it was successful.
voidedPurchaseStovePCVoidedPurchasesEx[]This is a list of canceled purchases.

This callback runs in the thread that called Base_RunCallback(). It runs once per call.

Error Codes

The value of CallbackResult.result.methodCode is Convert.ToUInt32(IAPSDKMethod.FETCH_VOIDED_PURCHASES).

CodeNameDescriptionShow to UserIn-Game Message
This function is not currently available in the SDK.

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.IAP;

IAP_FetchVoidedPurchasesEx(StovePCVoidedPurchasesMarketType.STEAM, OnFetchVoidedPurchasesExFinished);

void OnFetchVoidedPurchasesExFinished(CallbackResult callbackResult, StovePCVoidedPurchasesEx[] voidedPurchase)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for the success case.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

Notes

  • To view results without filtering by market, pass StovePCVoidedPurchasesMarketType.ALL to marketType.
  • You must call Base_RunCallback() repeatedly within the game loop for the callback to be triggered.

See Also


IAP_GetVersion

Kind Function · Module IAP · Version 3.4.1

Description

It retrieves the version string from the payment module and returns it by filling in version.

Declaration

csharp
public static Result IAP_GetVersion(ref string version, uint length)

Parameters

NameTypeRequiredDescription
versionref stringYThis is a reference variable that receives the version string. After the call, this variable is assigned the version value.
lengthuintYThe size (in characters) of the buffer that will hold the version string.

Returns

TypeDescription
ResultHere are the results of the call. Check result.IsSuccessful() to see if it was successful.

Error Codes

The value of Result.methodCode is Convert.ToUInt32(IAPSDKMethod.GET_VERSION).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMversion No buffer, length is 0, or the buffer size is insufficient to hold the stringx
251PCSDK_DLL_NOT_FOUNDFailed to check the version because the SDK file path could not be found.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OThere was a temporary issue. Please try again. [OK]

This function actually returns the BaseSDK integrated version as-is, rather than IAPSDK itself. For a complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;
using static Stove.PCSDK.IAP;

string version = string.Empty;
Result result = IAP_GetVersion(ref version, 64);
if (result.IsSuccessful())
{
    // Please implement the logic for when the operation succeeds. The `version` field will be populated with the version string.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • This function is synchronous and does not accept callbacks.
  • length must be large enough to hold the string that will be inserted into version.

See Also


IAP_Initialize

Kind Function · Module IAP · Version 3.0.0.4

Description

Call this method to initialize the module with the Shop Key before using the payment feature.

In the old interface, you must initialize each module—including the SDK and the payment functionality—separately. You must call this function after initializing the SDK.

Declaration

csharp
public static Result IAP_Initialize(string shopKey)

Parameters

NameTypeRequiredDescription
shopKeystringYThis is the store key used to initialize the payment functionality.

Returns

TypeDescription
ResultHere are the results of the call. Check result.IsSuccessful() to see if it was successful.

Error Codes

The value of Result.methodCode is Convert.ToUInt32(IAPSDKMethod.INITIALIZE).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
16BASE_NOT_INITIALIZEDBaseSDK has not been initialized. You must call Base_Initialize first.x
18ALREADY_INITIALIZEDIAP is already initializedx
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView that displays the payment pop-upx
251PCSDK_DLL_NOT_FOUNDFailed to verify the version because the SDK file path could not be found.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OThere was a temporary issue. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.IAP;

Result result = IAP_Initialize("YOUR_SHOP_KEY");
if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

See Also


IAP_InitializeWithWndInfo

Kind Function · Module IAP · Version 3.3.3

Description

Just like IAP_Initialize, this resets the payment functionality, but it also passes the handle of the main window via the mainWndHandle parameter.

In the old interface, you must initialize each module—including the payment functionality—separately, in addition to the SDK. You must call this function after initializing the SDK.

Declaration

csharp
public static Result IAP_InitializeWithWndInfo(string shopKey, IntPtr mainWndHandle)

Parameters

NameTypeRequiredDescription
shopKeystringYThis is the store key used to initialize the payment functionality.
mainWndHandleIntPtrYThis is the handle for the main window.

Returns

TypeDescription
ResultHere are the results of the call. Check result.IsSuccessful() to see if it was successful.

Error Codes

The value of Result.methodCode is Convert.ToUInt32(IAPSDKMethod.INITIALIZE).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
16BASE_NOT_INITIALIZEDBaseSDK was not initialized. You must call Base_Initialize first.x
18ALREADY_INITIALIZEDIAP is already initializedx
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView to display the payment pop-upx
251PCSDK_DLL_NOT_FOUNDFailed to verify the version because the SDK file path could not be foundx
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OA temporary problem has occurred. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.IAP;

Result result = IAP_InitializeWithWndInfo("YOUR_SHOP_KEY", mainWindowHandle);
if (result.IsSuccessful())
{
    // Please implement the logic for when the operation succeeds.
}
else
{
    // Please implement the logic for when a failure occurs.
}

Notes

  • This function is synchronous and does not accept callbacks.
  • If you don't need the main window handle, use IAP_Initialize.
  • Be sure to call IAP_UnInitialize when the process ends.

See Also


IAP_StartPayment

Kind Function · Module IAP · Version 3.0.0.4 · Deprecated

Description

This feature is deprecated. Please use IAP_StartPurchase instead.

We request payment using the method specified as option. Depending on how it works, a payment web view pop-up may appear.

It must be called after IAP_Initialize.

Declaration

csharp
public static void IAP_StartPayment(StovePCPaymentOption option, OnStartPaymentFinished onFinished)

Parameters

NameTypeRequiredDescription
optionStovePCPaymentOptionYHow the payment pop-up works, as well as its position and size.
onFinishedOnStartPaymentFinishedYThis is the callback that will receive the payment result.

Returns

None

Callback

csharp
public delegate void OnStartPaymentFinished(CallbackResult callbackResult, string url);
NameTypeDescription
callbackResultCallbackResultHere are the results of the call. Check callbackResult.result.IsSuccessful() to see if it was successful.
urlstringThis is the URL for the payment web view.

This callback runs in the thread that called Base_RunCallback(). It runs once per call.

Error Codes

The value of CallbackResult.result.methodCode is Convert.ToUInt32(IAPSDKMethod.START_PAYMENT).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDIAP has not been initialized. You must call IAP_Initialize first.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView to display the payment pop-upx
82WEBVIEW_CREATE_FAILFailed to create the payment pop-up web viewx
83WEBVIEW_LOAD_URL_FAILUnable to load the page in the payment pop-up web viewx
89WEBVIEW_CLOSE_ALL_FAILFailed to close all previously open pop-upsx
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;
using static Stove.PCSDK.IAP;

StovePCPaymentOption option = new StovePCPaymentOption();
option.operation = StovePCPaymentOperation.WITH_WEBVIEW;
option.webviewMode = WebViewMode.INTERNAL;
option.webviewWidth = 800;
option.webviewHeight = 600;

IAP_StartPayment(option, OnStartPaymentFinished);

void OnStartPaymentFinished(CallbackResult callbackResult, string url)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

  • If you need to detect when the popup closes (destroy) separately, use IAP_StartPaymentEx.
  • You must call Base_RunCallback() repeatedly within the game loop for the callback to be triggered.

See Also


IAP_StartPaymentEx

Kind Function · Module IAP · Version 3.3.4 · Deprecated

Description

This feature is deprecated. Please use IAP_StartPurchaseEx instead.

It requests payment in the same way as IAP_StartPayment, but also receives an additional callback (onDestroy) that is triggered when the payment pop-up closes. The remaining parameters and the result callback (onFinished) are the same as in IAP_StartPayment.

It must be called after IAP_Initialize.

Declaration

csharp
public static void IAP_StartPaymentEx(StovePCPaymentOption option, OnStartPaymentFinished onFinished, OnIAPPopupDestroyFinished onDestroy)

Parameters

NameTypeRequiredDescription
optionStovePCPaymentOptionYHow the payment pop-up works, as well as its position and size.
onFinishedOnStartPaymentFinishedYThis is the callback that will receive the payment result.
onDestroyOnIAPPopupDestroyFinishedNThis is a callback that is called when the payment pop-up closes.

Returns

None

Callback

csharp
public delegate void OnStartPaymentFinished(CallbackResult callbackResult, string url);
public delegate void OnIAPPopupDestroyFinished(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultHere are the results of the call. Check callbackResult.result.IsSuccessful() to see if it was successful.
urlstringThis is the URL of the payment web view passed to onFinished.

Both callbacks run on the thread that called Base_RunCallback(). onFinished is called when the request is processed, and onDestroy is called when the payment pop-up is closed.

Error Codes

The value of CallbackResult.result.methodCode is Convert.ToUInt32(IAPSDKMethod.START_PAYMENT).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDIAP has not been initialized. You must call IAP_Initialize first.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView that displays the payment pop-upx
82WEBVIEW_CREATE_FAILFailed to create the payment pop-up web viewx
83WEBVIEW_LOAD_URL_FAILUnable to load the page in the payment pop-up web viewx
89WEBVIEW_CLOSE_ALL_FAILFailed to close all previously open pop-upsx
90WEBVIEW_CLOSE_FAILFailed to close the popup (passed to the onDestroy callback)x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;
using static Stove.PCSDK.IAP;

StovePCPaymentOption option = new StovePCPaymentOption();
option.operation = StovePCPaymentOperation.WITH_WEBVIEW;
option.webviewMode = WebViewMode.INTERNAL;
option.webviewWidth = 800;
option.webviewHeight = 600;

IAP_StartPaymentEx(option, OnStartPaymentFinished, OnIAPPopupDestroyFinished);

void OnStartPaymentFinished(CallbackResult callbackResult, string url)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

void OnIAPPopupDestroyFinished(CallbackResult callbackResult)
{
    // Please implement the logic that runs when the payment pop-up closes.
}

Notes

  • If you don't need to detect when the pop-up closes, use IAP_StartPayment.
  • You must call Base_RunCallback() repeatedly within the game loop for the callback to be passed.

See Also


IAP_StartPurchase

Kind Function · Module IAP · Version 3.0.0.4

Description

Requests purchase of the products listed in startPurchaseParam. Depending on the purchase options, a web view pop-up may appear.

It must be called after IAP_Initialize.

Declaration

csharp
public static void IAP_StartPurchase(StovePCStartPurchaseParam startPurchaseParam, OnStartPurchaseFinished onFinished)

Parameters

NameTypeRequiredDescription
startPurchaseParamStovePCStartPurchaseParamYHere is the list of items to purchase and the pop-up options.
onFinishedOnStartPurchaseFinishedYThis is the callback function that will receive the purchase results.

Returns

None

Callback

csharp
public delegate void OnStartPurchaseFinished(CallbackResult callbackResult, StovePCPurchaseResult purchase);
NameTypeDescription
callbackResultCallbackResultHere are the results of the call. Check callbackResult.result.IsSuccessful() to see if it was successful.
purchaseStovePCPurchaseResultHere are the results of your purchase.

This callback runs in the thread that called Base_RunCallback(). It runs once per call.

Error Codes

The value of CallbackResult.result.methodCode is Convert.ToUInt32(IAPSDKMethod.START_PURCHASE).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDIAP has not been initialized. You must call IAP_Initialize first.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView that displays the purchase pop-upx
82WEBVIEW_CREATE_FAILFailed to create the purchase pop-up WebViewx
83WEBVIEW_LOAD_URL_FAILUnable to load the page in the purchase pop-up web viewx
84WEBVIEW_CLOSED_BEFORE_PURCHASEThe pop-up was closed before the purchase was completedOThe purchase was not completed successfully. Please try again. [OK]
85PARAMETER_LENGTH_EXCEEDEDThe length of serviceTxnNo or extraData exceeds the allowed range.OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
86INVALID_JSON_STRINGextraData is not in the correct JSON formatOThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
88INVALID_ORDER_PRODUCT_INFORMATIONThe purchase item information (quantity, salePrice, etc.) is incorrect.OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
89WEBVIEW_CLOSE_ALL_FAILFailed to close all previously open pop-upsx
252NOT_IMPLEMENTEDAn unknown value was specified for the purchase option (option.operation)x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;
using static Stove.PCSDK.IAP;

StovePCOrderProduct orderProduct = new StovePCOrderProduct();
orderProduct.productId = 123456;
orderProduct.salePrice = 1000;
orderProduct.quantity = 1;

StovePCPurchaseOption option = new StovePCPurchaseOption();
option.operation = StovePCPurchaseOperation.WITH_WEBVIEW;
option.webviewMode = WebViewMode.INTERNAL;
option.webviewWidth = 800;
option.webviewHeight = 600;

StovePCStartPurchaseParam purchaseParam = new StovePCStartPurchaseParam();
purchaseParam.products = new StovePCOrderProduct[] { orderProduct };
purchaseParam.productsSize = 1;
purchaseParam.option = option;
purchaseParam.serviceTxnNo = "YOUR_SERVICE_TXN_NO";
purchaseParam.extraData = "";

IAP_StartPurchase(purchaseParam, OnStartPurchaseFinished);

void OnStartPurchaseFinished(CallbackResult callbackResult, StovePCPurchaseResult purchase)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

  • If you need to detect when the popup closes (destroy) separately, use IAP_StartPurchaseEx.
  • You must call Base_RunCallback() repeatedly within the game loop for the callback to be passed.

See Also


IAP_StartPurchaseEx

Kind Function · Module IAP · Version 3.3.4

Description

It requests a purchase in the same way as IAP_StartPurchase, but also receives the onDestroy callback, which is called when the purchase pop-up closes. The remaining parameters and the result callback (onFinished) are the same as in IAP_StartPurchase.

It must be called after IAP_Initialize.

Declaration

csharp
public static void IAP_StartPurchaseEx(StovePCStartPurchaseParam startPurchaseParam, OnStartPurchaseFinished onFinished, OnIAPPopupDestroyFinished onDestroy)

Parameters

NameTypeRequiredDescription
startPurchaseParamStovePCStartPurchaseParamYHere is the list of items to purchase and the pop-up options.
onFinishedOnStartPurchaseFinishedYThis is the callback that will receive the purchase results.
onDestroyOnIAPPopupDestroyFinishedNThis is a callback that is triggered when the purchase pop-up closes.

Returns

None

Callback

csharp
public delegate void OnStartPurchaseFinished(CallbackResult callbackResult, StovePCPurchaseResult purchase);
public delegate void OnIAPPopupDestroyFinished(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultHere are the results of the call. Check callbackResult.result.IsSuccessful() to see if it was successful.
purchaseStovePCPurchaseResultThis is the purchase processing result sent to onFinished.

Both callbacks run on the thread that called Base_RunCallback(). onFinished is called when the purchase is complete, and onDestroy is called when the purchase pop-up is closed.

Error Codes

The value of CallbackResult.result.methodCode is Convert.ToUInt32(IAPSDKMethod.START_PURCHASE).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDIAP has not been initialized. You must call IAP_Initialize first.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView that displays the purchase pop-upx
82WEBVIEW_CREATE_FAILFailed to create the purchase pop-up WebViewx
83WEBVIEW_LOAD_URL_FAILUnable to load the page in the purchase pop-up web viewx
84WEBVIEW_CLOSED_BEFORE_PURCHASEThe pop-up was closed before the purchase was completedOYour purchase was not completed successfully. Please try again. [OK]
85PARAMETER_LENGTH_EXCEEDEDThe length of serviceTxnNo or extraData exceeds the allowed range.OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
86INVALID_JSON_STRINGextraData is not in the correct JSON formatOThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
88INVALID_ORDER_PRODUCT_INFORMATIONThe product information (quantity, salePrice, etc.) is incorrect.OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
89WEBVIEW_CLOSE_ALL_FAILFailed to close all previously open pop-upsx
90WEBVIEW_CLOSE_FAILFailed to close the popup (passed to the onDestroy callback)x
252NOT_IMPLEMENTEDAn unknown value was specified for the purchase option (option.operation)x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred inside the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.Base;
using static Stove.PCSDK.IAP;

StovePCOrderProduct orderProduct = new StovePCOrderProduct();
orderProduct.productId = 123456;
orderProduct.salePrice = 1000;
orderProduct.quantity = 1;

StovePCPurchaseOption option = new StovePCPurchaseOption();
option.operation = StovePCPurchaseOperation.WITH_WEBVIEW;
option.webviewMode = WebViewMode.INTERNAL;
option.webviewWidth = 800;
option.webviewHeight = 600;

StovePCStartPurchaseParam purchaseParam = new StovePCStartPurchaseParam();
purchaseParam.products = new StovePCOrderProduct[] { orderProduct };
purchaseParam.productsSize = 1;
purchaseParam.option = option;
purchaseParam.serviceTxnNo = "YOUR_SERVICE_TXN_NO";
purchaseParam.extraData = "";

IAP_StartPurchaseEx(purchaseParam, OnStartPurchaseFinished, OnIAPPopupDestroyFinished);

void OnStartPurchaseFinished(CallbackResult callbackResult, StovePCPurchaseResult purchase)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for the success case.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

void OnIAPPopupDestroyFinished(CallbackResult callbackResult)
{
    // Please implement the logic that runs when the purchase pop-up closes.
}

Notes

  • If you don't need to detect when the pop-up closes, use IAP_StartPurchase.
  • You must call Base_RunCallback() repeatedly within the game loop for the callback to be passed.

See Also


IAP_UnInitialize

Kind Function · Module IAP · Version 3.0.0.4

Description

Terminate the payment module initialized as IAP_Initialize / IAP_InitializeWithWndInfo.

In the old interface, you must initialize and terminate each module—including the SDK and payment features—individually. You must call this function before exiting the game.

Declaration

csharp
public static Result IAP_UnInitialize()

Parameters

None

Returns

TypeDescription
ResultHere are the results of the call. Check result.IsSuccessful() to see if it was successful.

Error Codes

The value of Result.methodCode is Convert.ToUInt32(IAPSDKMethod.UNINITIALIZE).

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDIAP is not initializedx
81VIEWUI_UNINIT_FAILEDFailed to close the payment web viewx
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred inside the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see IAPSDKResultCode.

Example

csharp
using static Stove.PCSDK.IAP;

Result result = IAP_UnInitialize();
if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

See Also


IAPSDKMethod

Kind Enum · Module IAP · Version 3.0.0.4

Description

This value identifies each API in the payment functionality. If an exception occurs within an API, it is converted to Convert.ToUInt32(IAPSDKMethod.Xxx) and stored in the methodCode field of Result or the result.methodCode field of CallbackResult.

The value itself has no bearing on success or failure; it is used to identify which API call caused an error when one occurs.

Declaration

csharp
public enum IAPSDKMethod
{
    INITIALIZE = 1,
    UNINITIALIZE = 2,
    GET_VERSION = 5,
    // ... See the "Values" table below
    WITHDRAW_GAME = 89,
}

Enum Values

CodeNameDescription
1INITIALIZEIAP_Initialize / IAP_InitializeWithWndInfo
2UNINITIALIZEIAP_UnInitialize
5GET_VERSIONIAP_GetVersion
80FETCH_SHOP_CATEGORIESIAP_FetchShopCategories
81FETCH_PRODUCTSIAP_FetchProducts / IAP_FetchProductsEx
82START_PURCHASEIAP_StartPurchase / IAP_StartPurchaseEx
83CONFIRM_PURCHASEIAP_ConfirmPurchase
84FETCH_INVENTORYIAP_FetchInventory
85FETCH_TERMS_AGREEMENTIAP_FetchTermsAgreement / IAP_FetchTermsAgreementEx
86START_PAYMENTIAP_StartPayment / IAP_StartPaymentEx
87FETCH_VOIDED_PURCHASESIAP_FetchVoidedPurchases / IAP_FetchVoidedPurchasesEx
88CLOSE_ALL_POPUPSIAP_CloseAllPopups
89WITHDRAW_GAMEIAP_WithdrawGame — For Lost Ark Mobile only

INTERNAL_SEND_81PLUG(3) and INTERNAL_UPDATE_81PLUG(4) are for internal use only and are not included in this document.

The value numbers are divided into two ranges: 1–5 (module-common APIs) and 80–89 (payment-function-specific APIs); numbers outside these ranges are not used.

Example

csharp
using static Stove.PCSDK.Base;
using static Stove.PCSDK.IAP;

void OnInitializeChecked(Result result)
{
    if (!result.IsSuccessful() && result.methodCode == Convert.ToUInt32(IAPSDKMethod.INITIALIZE))
    {
        // Please implement the logic for when the IAP_Initialize call fails.
    }
}

Notes

  • Since Result.methodCode and CallbackResult.result.methodCode are of type uint, they must be converted to Convert.ToUInt32(IAPSDKMethod.Xxx) for comparison.
  • Since other modules also have their own separate XxxSDKMethod enumerations, the numbers may overlap.

See Also


IAPSDKResultCode

Kind Result Code · Module IAP · Version 3.0.0.4

Description

This is the response code returned by all APIs in the payment functionality for the Result field in resultCode or the result.resultCode field in CallbackResult.

If the result is 0(SUCCESS), it is considered a success, and the result is evaluated as Result.IsSuccessful() / CallbackResult.result.IsSuccessful(). Any other value indicates a failure.

Declaration

csharp
public enum IAPSDKResultCode
{
    SUCCESS = 0,
    FAIL = 1,
    INVALID_CONFIG = 2,
    // ... See the "Values" table below
    WEBVIEW_CLOSE_ALL_FAIL = 89,
}

Enum Values

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
1FAILThis is a general error. Please try again or contact us.x
2INVALID_CONFIGThe settings are incorrect. Please check the settings in the caller.x
3INVALID_LOG_LEVELThe log level value is incorrect. You must check the settings in the calling section.x
4INVALID_LOG_PATHThe log path is incorrect. You need to check the caller settings.x
5INVALID_PARAMThe parameters passed are incorrect. Please check the calling parameters.x
16BASE_NOT_INITIALIZEDThe SDK has not been initialized. You must first call Base_Initialize.x
17NOT_INITIALIZEDThe payment function has not been initialized. You must first call IAP_Initialize.x
18ALREADY_INITIALIZEDThe payment feature is already initialized. You must remove the duplicate initialization call.x
19INVALID_ACCESS_TOKENThe access token is invalid. You must log in again or refresh the token.OYour login session has expired. Please close the game and restart it. [OK]
20NULL_TOKEN_ENTITYThe token information is empty. You must log in again or renew the token.x
21NULL_ENTITYThe required data is missing.x
22HTTP_ERRORAn HTTP communication error has occurred. Please check your network connection and try again.OThe network connection is unstable. Please check your network status and try again. [OK]
23RESPONSE_ERRORAn error occurred while processing the server response.OThe network connection is unstable. Please check your network status and try again. [OK]
24RESPONSE_INVALID_CODEThe server response code is incorrect.OThe network connection is unstable. Please check your network status and try again. [OK]
25RESPONSE_VALUE_IS_NULLThe server response is empty.OThe network connection is unstable. Please check your network status and try again. [OK]
26RESPONSE_INVALID_VALUE_FORMATThe format of the server response is incorrect.OThe network connection is unstable. Please check your network status and try again. [OK]
27LOG_81PLUG_ERRORThis is an 81Plug log transmission error.x
28UPDATE_81PLUG_FEED_ERRORError updating the 81Plug feedx
29ASYNC_OPERATION_IN_PROGRESSAn asynchronous task is already in progress. You must call this method again after the previous request has finished.x
30BASE_UNINITIALIZEDThe SDK has already been uninitialized. Please check the call sequence.x
31NOT_SUPPORTED_COUNTRYThis country is not supported.x
80VIEWUI_NOT_INITIALIZEDThe pop-up UI is not initialized. You need to check the initialization sequence.x
81VIEWUI_UNINIT_FAILEDFailed to close the pop-up UIx
82WEBVIEW_CREATE_FAILFailed to create a WebViewx
83WEBVIEW_LOAD_URL_FAILThe WebView was unable to load the URL. Please check your network connection and try again.x
84WEBVIEW_CLOSED_BEFORE_PURCHASEThe WebView closed before the purchase was completed. The user should be prompted to cancel.OThe purchase was not completed successfully. Please try again. [OK]
85PARAMETER_LENGTH_EXCEEDEDThe parameter length exceeds the allowed range. Please check the parameters in the calling code.OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
86INVALID_JSON_STRINGThe JSON string is invalid.OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
87WEBVIEW_CREATE_COOKIE_FAILFailed to create a WebView cookieOYou must agree to the terms and conditions to complete your purchase. We were unable to load the terms and conditions screen. Please try again. [OK]
88INVALID_ORDER_PRODUCT_INFORMATIONThe order details are incorrect. Please verify the product information in the call section.OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
89WEBVIEW_CLOSE_ALL_FAILFailed to close all WebViewsx
251PCSDK_DLL_NOT_FOUNDThe PCSDK native DLL could not be found. Please check the installation path.x
252NOT_IMPLEMENTEDThis feature has not been implemented.x
253UNMANAGED_EXCEPTIONAn exception occurred in the native (unmanaged) layer.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred in the .NET (managed) layerOA temporary issue has occurred. Please try again. [OK]
255UNKNOWN_ERRORAn unknown error has occurred.x

If you receive the code below, you must exit the game. The game cannot proceed normally.

  • 19 INVALID_ACCESS_TOKEN — Your login session has expired; please close the game and restart it.

Error codes are divided into the following ranges: 0–31 (module-specific errors), 80–89 (payment-function-specific errors), and 251–255 (system/exception errors); codes outside these ranges are not used.

Example

csharp
using static Stove.PCSDK.IAP;

void OnFetchProductsFinished(CallbackResult callbackResult, StovePCProduct[] products)
{
    if (!callbackResult.result.IsSuccessful())
    {
        if (callbackResult.result.resultCode == (uint)IAPSDKResultCode.NOT_INITIALIZED)
        {
            // Please implement the logic for cases where IAP_Initialize must be called first.
        }
        return;
    }
}

Notes

  • Although the range 8089 contains the same number range (e.g., LANGUAGE_NOT_SET) in BaseSDKResultCode, they belong to different enumeration types; therefore, while the numbers are the same, their meanings differ. You must also check IAPSDKMethod to determine which module’s API returned the value.
  • There are two values that are not defined in this enumeration but are present in SDKResultCode of the native payment functionality.
    • 90 (WEBVIEW_CLOSE_FAIL, Failed to close WebView) is a code that may actually be returned during the payment process. When this code occurs, the unnamed number 90 is passed as-is to the resultCode field; therefore, the developer must handle the branch based on the value itself (the integer 90).
    • 33(POPUP_NOT_CREATED) is an internal cleanup code used when a popup (WebView) is closed without being created; since the SDK wrapper intercepts it and does not pass it to the user's callback, you will never actually receive this value.

See Also


Log_GetVersion

Kind Function · Module Log · Version 3.4.1

Description

Retrieves version information for the logging feature.

It fills the variable provided by the caller with the version string and returns it.

Declaration

csharp
public static Result Log_GetVersion(ref string version, uint length);

Parameters

NameTypeRequiredDescription
versionref stringYThis is the variable that will hold the version string. Its value before the call is ignored and is replaced with the result string after the call.
lengthuintYThis is the length of the string buffer used internally.

Returns

TypeDescription
ResultHere are the results of the API call. Check result.IsSuccessful() to see if it was successful.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMversion No buffer, length is 0, or the buffer size is insufficient to hold the stringx
251PCSDK_DLL_NOT_FOUNDFailed to check the version because the SDK file path could not be found.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

This function actually returns the BaseSDK integrated version as-is, rather than the LogSDK version itself. For a complete list, see LogSDKResultCode.

Example

csharp
using static Stove.PCSDK.Log;

string version = null;
Result result = Log_GetVersion(ref version, 64);
if (result.IsSuccessful())
{
    // Please implement the logic for when the operation is successful. Use the `version` parameter.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • This function is synchronous and does not accept callbacks.

See Also


Log_Initialize

Kind Function · Module Log · Version 3.4.1

Description

Resets the log function.

You must call this method before calling any other APIs in this module. Since the code LogSDKResultCode.BASE_NOT_INITIALIZED is present, the SDK must be initialized first.

Declaration

csharp
public static Result Log_Initialize();

Parameters

None

Returns

TypeDescription
ResultHere are the results of the API call. Check result.IsSuccessful() to see if it was successful.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
16BASE_NOT_INITIALIZEDBaseSDK has not been initialized. You must call Base_Initialize first.x
18ALREADY_INITIALIZEDThe log feature is already initialized.x
80LOCAL_DB_CREATE_WORKING_DIRECTORY_FAILEDFailed to create the local working directory to store logsx
81LOCAL_DB_CONNECT_FAILEDFailed to connect to the local database for log storagex
82LOCAL_DB_CREATE_TABLE_FAILEDFailed to create a local DB table for log storagex
251PCSDK_DLL_NOT_FOUNDFailed to verify the version because the SDK file path could not be found.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see LogSDKResultCode.

Example

csharp
using static Stove.PCSDK.Log;

Result result = Log_Initialize();
if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • This function is synchronous and does not accept callbacks.
  • When you are finished using the module, you must call Log_UnInitialize to clean up the resources.
  • The logging feature was added to the entire module in version 3.4.1.

See Also


Log_Send

Kind Function · Module Log · Version 3.4.1

Description

Sends logs to the STOVE log server. The value stored in StovePCLogSendParam is sent as-is as a log entry.

You must initialize it to Log_Initialize before calling it.

Declaration

csharp
public static void Log_Send(StovePCLogSendParam logSendParam, OnLogSendFinished onFinished);

Parameters

NameTypeRequiredDescription
logSendParamStovePCLogSendParamYThe value of the log entry to be transmitted.
onFinishedOnLogSendFinishedYThis is a callback that receives the transmission results.

Returns

None

Callback

csharp
public delegate void OnLogSendFinished(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultHere are the results of the transmission call. Check callbackResult.result.IsSuccessful() to see if it was successful.

The callback runs in the thread that called Base_RunCallback() and is passed once for each call to Log_Send().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSA log entry is recorded in the local database (this does not indicate that the data was successfully transmitted to the server)x
17NOT_INITIALIZEDThe log function has not been initialized. You must first call Log_Initialize.x
84LOCAL_DB_BACKUP_LOG_FAILEDFailed to write logs to the local databasex
85INVALID_LOG_PARAMETERcontents is not in the correct JSON formatx
86LOG_SIZE_EXCEEDEDThe log content size exceeds the allowed limit (50 KB).x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOThere was a temporary issue. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check callbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see LogSDKResultCode.

Example

csharp
using static Stove.PCSDK.Log;

void OnLogSendFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

var logSendParam = new StovePCLogSendParam
{
    auid = auid,
    cuid = cuid,
    gameVersion = "1.2.3",
    contents = "{\"event\":\"login\"}"
};

Log_Send(logSendParam, OnLogSendFinished);

Notes

  • This function is asynchronous, and the callback is executed once on the thread that calls Base_RunCallback().
  • Fields with unknown values can be left with their default values (the number 0, the string null, or an empty value).
  • The logging feature was added to the entire module in version 3.4.1.
  • onFinished The callback is invoked at SUCCESS when the log is written to the local database. The actual transmission to the STOVE log server is handled separately, and even if the transmission to the server fails, this callback will not be triggered.
  • Except for failures when writing to the local database (such as LOCAL_DB_BACKUP_LOG_FAILED), this callback virtually always returns a success. We recommend that you do not design your game logic to branch based on the result of this callback.

See Also


Log_UnInitialize

Kind Function · Module Log · Version 3.4.1

Description

Releases resources used by the logging feature.

This function cleans up resources initialized with Log_Initialize and should be called when you are done using the module.

Declaration

csharp
public static Result Log_UnInitialize();

Parameters

None

Returns

TypeDescription
ResultHere are the results of the API call. Check result.IsSuccessful() to see if it was successful.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe log feature is not initialized.x
83LOCAL_DB_DISCONNECT_FAILEDFailed to disconnect from the local database used for log storagex
253UNMANAGED_EXCEPTIONAn exception occurred within the native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see LogSDKResultCode.

Example

csharp
using static Stove.PCSDK.Log;

Result result = Log_UnInitialize();
if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • This function is synchronous and does not accept callbacks.
  • This is the function that pairs with Log_Initialize.
  • The logging feature was added to the entire module in version 3.4.1.

See Also


LogSDKMethod

Kind Enum · Module Log · Version 3.4.1

Description

This identifies which logging function produced the result, based on the value returned as Result.methodCode or CallbackResult.result.methodCode.

Declaration

csharp
public enum LogSDKMethod
{
    INITIALIZE = 1,
    UNINITIALIZE = 2,
    GET_VERSION = 5,
    SEND = 80,
};

Enum Values

CodeNameDescription
1INITIALIZEThis is the result created by Log_Initialize.
2UNINITIALIZEThis is the result created by Log_UnInitialize.
3, 4Not in use (reserved number)
5GET_VERSIONThis is the result created by Log_GetVersion.
6 ~ 79Not in use (reserved number)
80SENDThis is the result created by Log_Send.

Example

csharp
if (callbackResult.result.methodCode == Convert.ToUInt32(LogSDKMethod.SEND))
{
    // Here are the results from Log_Send.
}

Notes

  • Since Result.methodCode is a uint field, you must convert it to Convert.ToUInt32() or similar when comparing it to this enumeration value.

See Also


LogSDKResultCode

Kind Result Code · Module Log · Version 3.4.1

Description

This is the value returned as Result.resultCode or CallbackResult.result.resultCode. A value of 0 (SUCCESS) indicates success; any other value indicates failure.

The first part (0–31, 251–255) consists of common code shared with other PCSDK legacy modules, while values 80 and above are error codes specific to the logging feature.

Declaration

csharp
public enum LogSDKResultCode
{
    SUCCESS = 0,
    FAIL = 1,
    // ... See the "Values" table below
    LOG_SIZE_EXCEEDED = 86,
}

Enum Values

Shared Code

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
1FAILGeneral failure. Check log/exceptionMessage for the detailed cause.x
2INVALID_CONFIGThe setting is invalid. Please check the setting.x
3INVALID_LOG_LEVELThe log level value is invalid. Please verify the log level value.x
4INVALID_LOG_PATHThe log path is invalid. Please verify the log path.x
5INVALID_PARAMThe parameter is invalid. Please check the parameter value in the calling code and correct it.x
6 ~ 15Not in use (reserved section)
16BASE_NOT_INITIALIZEDThe SDK has not been initialized. Call Base_Initialize() first.x
17NOT_INITIALIZEDThe log function has not been initialized. Call Log_Initialize first.x
18ALREADY_INITIALIZEDIt has already been initialized. Remove the duplicate initialization call.x
19INVALID_ACCESS_TOKENThe AccessToken is invalid. Please check if the token needs to be reissued.OYour login session has expired. Please close the game and restart it. [OK]
20NULL_TOKEN_ENTITYThe token entity is null. Check the token issuance status.x
21NULL_ENTITYThe entity is null. Check whether the response object is null.x
22HTTP_ERRORAn HTTP communication error has occurred. Please check your network connection and try again.OThe network connection is unstable. Please check your network status and try again. [OK]
23RESPONSE_ERRORThis is a server response error. Please check the server response.OThe network connection is unstable. Please check your network status and try again. [OK]
24RESPONSE_INVALID_CODEThe server response code is invalid. Please check the server response code.OThe network connection is unstable. Please check your network status and try again. [OK]
25RESPONSE_VALUE_IS_NULLThe server response is empty. Please check the server response.OThe network connection is unstable. Please check your network status and try again. [OK]
26RESPONSE_INVALID_VALUE_FORMATThe server response format is incorrect. Check the server response format.OThe network connection is unstable. Please check your network status and try again. [OK]
27LOG_81PLUG_ERROR81 Plug transmission failed (Deprecated)x
28UPDATE_81PLUG_FEED_ERROR81 Plug update failed (Deprecated)x
29ASYNC_OPERATION_IN_PROGRESSAn asynchronous operation is already in progress. Please call again after the current asynchronous operation has completed.x
30BASE_UNINITIALIZEDThe SDK has already been uninitialized. Re-call Base_Initialize().x
31NOT_SUPPORTED_COUNTRYThis feature is not currently available in your country or region. Please check the country/region restrictions and stop the call.x
32 ~ 79Not in use (reserved section)

Unique Code for Logging Functionality

CodeNameDescriptionShow to UserIn-Game Message
80LOCAL_DB_CREATE_WORKING_DIRECTORY_FAILEDFailed to create the local DB working directory. Please check the local repository path and permissions.x
81LOCAL_DB_CONNECT_FAILEDFailed to initialize (connect to) the local database. Please check the status of the local repository and try again.x
82LOCAL_DB_CREATE_TABLE_FAILEDFailed to create the local database table. Please check the status of the local storage and try again.x
83LOCAL_DB_DISCONNECT_FAILEDFailed to initialize (disconnect from) the local database. Please check the status of the local storage and try again.x
84LOCAL_DB_BACKUP_LOG_FAILEDFailed to back up the logs to the local database. Please check the status of the local storage and try again.x
85INVALID_LOG_PARAMETERThe parameters passed to the log transmission API are invalid. Please check the parameters in the calling code.x
86LOG_SIZE_EXCEEDEDThe log size has exceeded the maximum allowed limit. Please reduce the size of the log and try again.x
251 ~ 255System/Runtime Failure (Generic Code, see below)
CodeNameDescriptionShow to UserIn-Game Message
251PCSDK_DLL_NOT_FOUNDThe PC SDK DLL cannot be found. Check the DLL location.x
252NOT_IMPLEMENTEDThis feature has not been implemented. Please remove the call or check for an alternative API.x
253UNMANAGED_EXCEPTIONAn unmanaged exception has occurred. Check the exception log.OThere was a temporary issue. Please try again. [OK]
254MANAGED_EXCEPTIONA managed exception has occurred. Check the exception log.OThere was a temporary issue. Please try again. [OK]
255UNKNOWN_ERRORAn unknown error has occurred. Check the detailed log.x

If you see the code below, you must exit the game. The game cannot proceed normally.

  • 19 INVALID_ACCESS_TOKEN — Your login session has expired; you must exit the game and restart it.

Example

csharp
void OnLogSendFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else if (callbackResult.result.resultCode == (uint)LogSDKResultCode.LOG_SIZE_EXCEEDED)
    {
        // Please implement logic to reduce the log size before resending it.
    }
}

Notes

  • Since Result.resultCode is a uint field, you must convert it using (uint) casting or similar methods when comparing it to this enumeration value.
  • When Log_Send() fails, error codes 80 through 86 may appear.

See Also


PCBang_CheckPCBangStatus

Kind Function · Module PCBang · Version 3.0.2

Description

Checks whether PC Bang is present and the product's usage status. The result is passed to the callback as StovePCBangStatus.

Declaration

csharp
public static void PCBang_CheckPCBangStatus(OnPCBangCheckPCBangStatusOnFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnPCBangCheckPCBangStatusOnFinishedYThis is the callback that receives the query results.

Returns

None

Callback

csharp
public delegate void OnPCBangCheckPCBangStatusOnFinished(CallbackResult result, StovePCBangStatus stovePCBangStatus);
NameTypeDescription
resultCallbackResultHere are the results of the query. Check result.result.IsSuccessful() to see if it was successful.
stovePCBangStatusStovePCBangStatusHere is the current status of PC Bang and the product code information.

The callback runs in the thread that called Base_RunCallback() and is called only once for the query results.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDPC Bang The function has not been initialized. You must call PCBang_Initialize first.x
22HTTP_ERRORThe network request failed due to an HTTP errorOThe network connection is not working properly. Please check your network status and try again. [OK]
23RESPONSE_ERRORThere is an error in the server response.OThe network connection is unstable. Please check your network status and try again. [OK]
25RESPONSE_VALUE_IS_NULLThe server response data is empty.OThe network connection is unstable. Please check your network status and try again. [OK]
249NETWORK_TRANSPORT_ERRORAn error occurred at the network transport layer.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see PCBangSDKResultCode.

Example

csharp
using static Stove.PCSDK.PCBang;

void OnCheckStatusFinished(CallbackResult result, StovePCBangStatus status)
{
    if (result.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

PCBang_CheckPCBangStatus(OnCheckStatusFinished);

Notes

  • This function is asynchronous, and the callback is executed once on the thread that calls Base_RunCallback().
  • This is a separate lookup API from the login results for PCBang_UserLogin.

See Also


PCBang_GetVersion

Kind Function · Module PCBang · Version 3.0.2

Description

Retrieves version information for the PC Bang function.

It fills the variable provided by the caller with the version string and returns it.

Declaration

csharp
public static Result PCBang_GetVersion(ref string version, uint length);

Parameters

NameTypeRequiredDescription
versionref stringYThis is the variable that will receive the version string. Any value it contains before the call is ignored and replaced with the resulting string after the call.
lengthuintYThis is the length of the string buffer used internally.

Returns

TypeDescription
ResultHere are the results of the API call. Check result.IsSuccessful() to see if it was successful.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMversion No buffer, length is 0, or the buffer size is insufficient to hold the stringx
251PCSDK_DLL_NOT_FOUNDFailed to retrieve the version because the SDK file path could not be found.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OThere was a temporary issue. Please try again. [OK]

This function actually returns the BaseSDK integrated version as-is, rather than the PCBangSDK version itself. For a complete list, see PCBangSDKResultCode.

Example

csharp
using static Stove.PCSDK.PCBang;

string version = null;
Result result = PCBang_GetVersion(ref version, 64);
if (result.IsSuccessful())
{
    // Please implement the logic for when the operation succeeds. Use the `version` parameter.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • This function is synchronous and does not accept callbacks.

See Also


PCBang_Initialize

Kind Function · Module PCBang · Version 3.0.2

Description

Initializes the PC Bang function.

You must call this method before calling any other APIs in this module. Since the code PCBangSDKResultCode.BASE_NOT_INITIALIZED is present, the SDK must be initialized first.

Declaration

csharp
public static Result PCBang_Initialize();

Parameters

None

Returns

TypeDescription
ResultHere are the results of the API call. Check result.IsSuccessful() to see if it was successful.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
16BASE_NOT_INITIALIZEDBaseSDK has not been initialized. You must call Base_Initialize first.x
18ALREADY_INITIALIZEDPC Bang The feature has already been initialized.x
251PCSDK_DLL_NOT_FOUNDFailed to verify the version because the SDK file path could not be found.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see PCBangSDKResultCode.

Example

csharp
using static Stove.PCSDK.PCBang;

Result result = PCBang_Initialize();
if (result.IsSuccessful())
{
    // Please implement the logic for the success case.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • This function is synchronous and does not accept callbacks.
  • When you are finished using the module, you must call PCBang_UnInitialize to clean up the resources.

See Also


PCBang_UnInitialize

Kind Function · Module PCBang · Version 3.0.2

Description

Free up resources for the PC Bang feature.

This function cleans up resources initialized with PCBang_Initialize and should be called when you are finished using the module.

Declaration

csharp
public static Result PCBang_UnInitialize();

Parameters

None

Returns

TypeDescription
ResultHere are the results of the API call. Check result.IsSuccessful() to determine whether it was successful.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDPC Bang The feature has not been initialized.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OThere was a temporary issue. Please try again. [OK]

For the complete list, see PCBangSDKResultCode.

Example

csharp
using static Stove.PCSDK.PCBang;

Result result = PCBang_UnInitialize();
if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for when a failure occurs.
}

Notes

  • This function is synchronous and does not accept callbacks.
  • This is a function that pairs with PCBang_Initialize.

See Also


PCBang_UserLogin

Kind Function · Module PCBang · Version 3.0.2

Description

The service logs in the game user via PC Bang. The login result is sent to the onUserLoginFinished callback, and the PC Bang benefit information—which is updated every 4 minutes—is sent to the onRefreshBenefitsFinished callback.

You must initialize it to PCBang_Initialize before calling it.

In actual implementation, both callbacks are registered only when neither is null. If even one is null, neither callback is registered.

Declaration

csharp
public static void PCBang_UserLogin(OnPCBangUserLoginOnFinished onUserLoginFinished, OnPCBangRefreshUserBenefitsOnFinished onRefreshBenefitsFinished);

Parameters

NameTypeRequiredDescription
onUserLoginFinishedOnPCBangUserLoginOnFinishedYThis is the callback that receives the login results.
onRefreshBenefitsFinishedOnPCBangRefreshUserBenefitsOnFinishedYThis is a callback that receives updated benefit information every 4 minutes. You must specify both callbacks for registration to be complete.

Returns

None

Callback

Login results and benefit update information are delivered separately via different callbacks.

Login Result Callback

csharp
public delegate void OnPCBangUserLoginOnFinished(CallbackResult result, StovePCBangUserLogin stovePCBangUserLogin);
NameTypeDescription
resultCallbackResultHere are the results of the login request. Check result.result.IsSuccessful() to see if it was successful.
stovePCBangUserLoginStovePCBangUserLoginHere is the login information (Premium status, PC Bang serial number, time remaining).

Benefit Renewal Callback

csharp
public delegate void OnPCBangRefreshUserBenefitsOnFinished(CallbackResult result, StovePCRefreshUserBenefits stovePCRefreshUserBenefits);
NameTypeDescription
resultCallbackResultHere are the results of your benefit renewal.
stovePCRefreshUserBenefitsStovePCRefreshUserBenefitsHere is the updated benefit information (premium status, time remaining).

Both callbacks run on the thread that called Base_RunCallback().

  • onUserLoginFinished is called for each login request.
  • onRefreshBenefitsFinished is called every 4 minutes to provide updated benefit information.
  • If you call PCBang_UserLogin again, the previously registered benefit renewal callback will be replaced with the new callback.

Error Codes

The value of result.methodCode in the login results is PCBangSDKMethod.USER_LOGIN, and the value of result.methodCode in the benefit renewal results is PCBangSDKMethod.REFRESH_USER_BENEFITS.

Both callbacks use the same code shown below.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDPC Bang The function has not been initialized. You must call PCBang_Initialize first.x
22HTTP_ERRORThe network request failed due to an HTTP errorOThe network connection is not working properly. Please check your network status and try again. [OK]
23RESPONSE_ERRORThere is an error in the server responseOThe network connection is unstable. Please check your network status and try again. [OK]
25RESPONSE_VALUE_IS_NULLThe server response data is empty.OThe network connection is unstable. Please check your network status and try again. [OK]
26RESPONSE_INVALID_VALUE_FORMATThe server response data format is invalidOThe network connection is unstable. Please check your network status and try again. [OK]
249NETWORK_TRANSPORT_ERRORAn error occurred at the network transport layer.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOThere was a temporary issue. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred inside the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary problem has occurred. Please try again. [OK]

For the complete list, see PCBangSDKResultCode.

Example

csharp
using static Stove.PCSDK.PCBang;

void OnUserLoginFinished(CallbackResult result, StovePCBangUserLogin login)
{
    if (result.result.IsSuccessful())
    {
        // Please implement the logic for the success case.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

void OnRefreshBenefitsFinished(CallbackResult result, StovePCRefreshUserBenefits benefits)
{
    if (result.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

PCBang_UserLogin(OnUserLoginFinished, OnRefreshBenefitsFinished);

Notes

  • This function is asynchronous, and the two callbacks run on the thread that calls Base_RunCallback().
  • To log out, call PCBang_UserLogout.
  • Even when the status is "Free" (PCBangPremium.PCBANG_FREE), benefit renewal callbacks will continue to be sent.

See Also


PCBang_UserLogout

Kind Function · Module PCBang · Version 3.0.2

Description

Log out the game user from the PC Bang service.

PCBang_UserLogin Stops repeated calls to the benefit renewal callback that was initiated.

Declaration

csharp
public static void PCBang_UserLogout(OnPCBangUserLogoutOnFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnPCBangUserLogoutOnFinishedYThis is the callback that receives the logout result.

Returns

None

Callback

csharp
public delegate void OnPCBangUserLogoutOnFinished(CallbackResult result);
NameTypeDescription
resultCallbackResultHere are the results of the logout call. Check result.result.IsSuccessful() to determine whether it was successful.

The callback runs in the thread that called Base_RunCallback() and is called only once upon successful logout.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDPC Bang The function has not been initialized. You must call PCBang_Initialize first.x
22HTTP_ERRORThe network request failed due to an HTTP errorOThe network connection is unstable. Please check your network status and try again. [OK]
23RESPONSE_ERRORThere is an error in the server response.OThe network connection is not working properly. Please check your network status and try again. [OK]
25RESPONSE_VALUE_IS_NULLThe server response data is empty.OThe network connection is unstable. Please check your network status and try again. [OK]
249NETWORK_TRANSPORT_ERRORAn error occurred at the network transport layer.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see PCBangSDKResultCode.

Example

csharp
using static Stove.PCSDK.PCBang;

void OnUserLogoutFinished(CallbackResult result)
{
    if (result.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

PCBang_UserLogout(OnUserLogoutFinished);

Notes

  • This function is asynchronous, and the callback is executed once on the thread that calls Base_RunCallback().
  • You must call this function to stop the repeated calls to the benefit renewal callback for PCBang_UserLogin.

See Also


PCBangPremium

Kind Enum · Module PCBang · Version 3.0.2

Description

This value indicates the premium (paid) subscription status of the logged-in user. The premiumStatus field in StovePCBangUserLogin, StovePCBangStatus, and StovePCRefreshUserBenefits contains this value.

This enumeration does not have separate codes to indicate success or failure. PCBANG_ERROR is a value that indicates a server error or an unrecognizable status, and the success or failure of the operation is determined separately using CallbackResult.result.IsSuccessful().

Declaration

csharp
public enum PCBangPremium
{
    PCBANG_ERROR = -1,
    PCBANG_PREMIUM = 1,
    PCBANG_FREE = 2,
    PCBANG_FREE_OTHER = 3,
};

Enum Values

CodeNameDescription
-1PCBANG_ERRORUnable to determine the server error/status.
1PCBANG_PREMIUMPremium (paid) PC Bang benefits are currently available.
2PCBANG_FREEYou are currently using the free version.
3PCBANG_FREE_OTHERThis is a free service provided by a partner company (third party).

Example

csharp
void OnUserLoginFinished(CallbackResult result, StovePCBangUserLogin login)
{
    if (result.result.IsSuccessful())
    {
        if (login.premiumStatus == PCBangPremium.PCBANG_PREMIUM)
        {
            // Please implement the logic for premium benefits.
        }
    }
}

Notes

See Also


PCBangSDKMethod

Kind Enum · Module PCBang · Version 3.0.2

Description

Based on the value returned as Result.methodCode or CallbackResult.result.methodCode, this identifies which PC Bang function produced the result.

Declaration

csharp
public enum PCBangSDKMethod
{
    INITIALIZE = 1,
    UNINITIALIZE = 2,
    INTERNAL_SEND_81PLUG = 3,
    INTERNAL_UPDATE_81PLUG = 4,
    GET_VERSION = 5,
    USER_LOGIN = 80,
    USER_LOGOUT = 81,
    CHECK_PCBANG_STATUS = 82,
    REFRESH_USER_BENEFITS = 83,
};

Enum Values

CodeNameDescription
1INITIALIZEThis is the result created by PCBang_Initialize.
2UNINITIALIZEThis is the result created by PCBang_UnInitialize.
3INTERNAL_SEND_81PLUGThis is an internal-use-only value.
4INTERNAL_UPDATE_81PLUGThis value is for internal use only.
5GET_VERSIONThis is the result created by PCBang_GetVersion.
6~79Not in use (reserved number)
80USER_LOGINThis is the result generated by the login callback for PCBang_UserLogin.
81USER_LOGOUTThis is the result created by PCBang_UserLogout.
82CHECK_PCBANG_STATUSThis is the result created by PCBang_CheckPCBangStatus.
83REFRESH_USER_BENEFITSThis is the result generated by the benefit renewal callback for PCBang_UserLogin.

Internal-only values (INTERNAL_SEND_81PLUG, INTERNAL_UPDATE_81PLUG) are listed in the table above by name and number only and are not exposed via a separate public API.

Example

csharp
if (callbackResult.result.methodCode == Convert.ToUInt32(PCBangSDKMethod.USER_LOGIN))
{
    // Here are the login results for PCBang_UserLogin.
}

Notes

  • Since Result.methodCode is a uint field, you must convert it to Convert.ToUInt32() or similar when comparing it with this enumeration value.
  • USER_LOGIN and REFRESH_USER_BENEFITS are values used to distinguish between the two results passed as callbacks at different times during a single call to PCBang_UserLogin.

See Also


PCBangSDKResultCode

Kind Result Code · Module PCBang · Version 3.0.2

Description

This is the value returned by Result.resultCode or CallbackResult.result.resultCode. A value of 0 (SUCCESS) indicates success; any other value indicates failure.

This code is shared code that shares the same number range as the SDKResultCode series of other PCSDK legacy modules, including the SDK. You must check the Result.sdkName value to determine which module generated the result.

Declaration

csharp
public enum PCBangSDKResultCode
{
    SUCCESS = 0,
    FAIL = 1,
    // ... See the "Values" table below
    UNKNOWN_ERROR = 255,
}

Enum Values

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
1FAILThis is a general error. Check the logs or exceptionMessage for the specific cause.x
2INVALID_CONFIGThe setting is invalid. Please verify the setting.x
3INVALID_LOG_LEVELThe log level value is invalid. You must verify the log level value.x
4INVALID_LOG_PATHThe log path is invalid. Please verify the log path.x
5INVALID_PARAMThe parameter is invalid. Please check the parameter value in the calling code and correct it.x
6 ~ 15Not in use (reserved section)x
16BASE_NOT_INITIALIZEDThe SDK has not been initialized. You must first call Base_Initialize().x
17NOT_INITIALIZEDPC Bang The function has not been initialized. You must call PCBang_Initialize first.x
18ALREADY_INITIALIZEDIt has already been initialized. You must remove the duplicate initialization call.x
19INVALID_ACCESS_TOKENThe AccessToken is invalid. The token must be reissued.OYour login session has expired. Please close the game and restart it. [OK]
20NULL_TOKEN_ENTITYThe token entity is null. You must verify the token issuance status.x
21NULL_ENTITYThe entity is null. You must check whether the response object is null.x
22HTTP_ERRORAn HTTP communication error has occurred. Please check your network connection and try again.OThe network connection is unstable. Please check your network connection and try again. [OK]
23RESPONSE_ERRORThis is a server response error. You need to check the server response.OThe network connection is unstable. Please check your network status and try again. [OK]
24RESPONSE_INVALID_CODEThe server response code is invalid. You must verify the server response code.OThe network connection is unstable. Please check your network status and try again. [OK]
25RESPONSE_VALUE_IS_NULLThe server response is empty. You must verify the server response.OThe network connection is unstable. Please check your network connection and try again. [OK]
26RESPONSE_INVALID_VALUE_FORMATThe server response format is incorrect. You must verify the server response format.OThe network connection is unstable. Please check your network status and try again. [OK]
27LOG_81PLUG_ERROR81 Plug transmission failed (Deprecated)x
28UPDATE_81PLUG_FEED_ERROR81 Plug update failed (Deprecated)x
29ASYNC_OPERATION_IN_PROGRESSAn asynchronous operation is already in progress. You must call this method again after the ongoing asynchronous operation is complete.x
30BASE_UNINITIALIZEDThe SDK has already been uninitialized. You must call Base_Initialize() again.x
31NOT_SUPPORTED_COUNTRYThis feature is not currently available in your country/region. Please check the country/region restrictions and stop the call.x
32 ~ 250Not in use (reserved section)x
251PCSDK_DLL_NOT_FOUNDThe PC SDK DLL cannot be found. Please check the DLL's location.x
252NOT_IMPLEMENTEDThis feature has not been implemented. You should remove the call or check for an alternative API.x
253UNMANAGED_EXCEPTIONAn unmanaged exception has occurred. You should check the exception log.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONA managed exception has occurred. You should check the exception log.OThere was a temporary issue. Please try again. [OK]
255UNKNOWN_ERRORThis is an unknown error. You need to check the detailed log.x

If you see the code below, you must exit the game. The game cannot proceed normally.

  • 19 INVALID_ACCESS_TOKEN — Your login session has expired; you must close the game and restart it.

Example

csharp
Result result = PCBang_Initialize();

if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
}
else if (result.resultCode == (uint)PCBangSDKResultCode.ALREADY_INITIALIZED)
{
    // Please implement the logic for cases where it has already been initialized.
}

Notes

  • 28(UPDATE_81PLUG_FEED_ERROR) is a code used for internal integration and remains deprecated.
  • Since Result.resultCode is a uint field, you must convert it using (uint) casting or similar methods when comparing it to this enumeration value.

See Also


ProductTypeCode

Kind Enum · Module IAP · Version 3.0.0.4

Description

This indicates the type of product contained in the StovePCProduct.productTypeCode / StovePCProductEx.productTypeCode fields and passed to the IAP_FetchProducts / IAP_FetchProductsEx callbacks.

Declaration

csharp
public enum ProductTypeCode
{
    NONE = 0,
    INDIE_PACKAGE_GAME_ITEM = 1,
    IN_GAME_ITEM,
    PACKAGE_ITEM,
};

Enum Values

CodeNameDescription
0NONENo type has been specified.
1INDIE_PACKAGE_GAME_ITEMThis is an indie game bundle.
2IN_GAME_ITEMThis is an in-game item.
3PACKAGE_ITEMThis is a package deal.

Example

csharp
using static Stove.PCSDK.IAP;

void OnFetchProductsFinished(CallbackResult callbackResult, StovePCProduct[] products)
{
    if (!callbackResult.result.IsSuccessful())
    {
        return;
    }

    foreach (var product in products)
    {
        if (product.productTypeCode == ProductTypeCode.IN_GAME_ITEM)
        {
            // Please implement the logic for in-game item sales.
        }
    }
}

Notes

See Also


PurchaseLimitTypeCode

Kind Enum · Module IAP · Version 3.0.0.4

Description

Stored in the StovePCProduct.purchaseLimitTypeCode / StovePCProductEx.purchaseLimitTypeCode fields, this indicates the unit in which purchaseLimitCount limits the purchase quantity.

Declaration

csharp
public enum PurchaseLimitTypeCode
{
    NONE = 0,
    UNLIMITED = 1,
    MEMBER,
    CHARACTER
};

Enum Values

CodeNameDescription
0NONENo restrictions have been specified.
1UNLIMITEDThere are no purchase limits.
2MEMBERPurchases are limited to one per member (account).
3CHARACTERPurchases are limited on a per-character basis.

Example

csharp
using static Stove.PCSDK.IAP;

void CheckPurchaseLimit(StovePCProduct product)
{
    if (product.purchaseLimitTypeCode == PurchaseLimitTypeCode.CHARACTER)
    {
        // Please implement the UI logic for character-based purchase limits. `purchaseLimitCount` is the limit.
    }
}

Notes

  • It is used, along with the purchaseLimitCount and saleLimitCount fields, to determine the number of units of a product that can be purchased.

See Also


PurchaseProgress

Kind Enum · Module IAP · Version 3.0.0.4

Description

Stored in the StovePCPurchaseResult.purchaseProgress field and passed to the IAP_StartPurchase / IAP_StartPurchaseEx callback. Indicates whether a payment window should be displayed after the purchase request.

Declaration

csharp
public enum PurchaseProgress
{
    NONE = 0,
    NEED_PAYMENT_WINDOW = 1,
    NOT_NEED_PAYMENT_WINDOW
};

Enum Values

CodeNameDescription
0NONEThe progress status has not been specified.
1NEED_PAYMENT_WINDOWYou need to open an additional payment window.
2NOT_NEED_PAYMENT_WINDOWThere is no need to open an additional payment window.

Example

csharp
using static Stove.PCSDK.IAP;

void OnStartPurchaseFinished(CallbackResult callbackResult, StovePCPurchaseResult purchase)
{
    if (!callbackResult.result.IsSuccessful())
    {
        return;
    }

    if (purchase.purchaseProgress == PurchaseProgress.NEED_PAYMENT_WINDOW)
    {
        // Please implement the logic to open the payment window using `oneTimePaymentUrl`.
    }
}

Notes

  • When NEED_PAYMENT_WINDOW occurs, you should also check StovePCPurchaseResult.oneTimePaymentUrl.

See Also


Result

Kind Struct · Module Base · Version 3.0.0.4

Description

Result is both the result directly returned by the SDK Legacy’s synchronous APIs (e.g., Base_UnInitialize, Base_SetLanguage) and the result contained within CallbackResult that is passed via an asynchronous callback.

If resultCode equals 0 (BaseSDKResultCode.SUCCESS), it is successful. This is determined using the IsSuccessful() method.

Declaration

csharp
public struct Result
{
    public string sdkName;
    public uint methodCode;
    public uint resultCode;
    public string exceptionMessage;
}

Members

NameTypeDescription
sdkNamestringName of the SDK (DLL) that generated the results
methodCodeuintThe BaseSDKMethod value that identifies the API that generated this result
resultCodeuintValue BaseSDKResultCode. If 0, success
exceptionMessagestringException message when an exception occurs. May be empty if no exception occurs.

Example

csharp
using static Stove.PCSDK.Base;

Result result = Base_SetLanguage(StoveLanguage.ko);

if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for handling failures. Check `result.resultCode` and `result.exceptionMessage`.
}

Notes

  • result.IsSuccessful() is a method. Be careful not to confuse it with the result.IsSuccessful property of the new C# interface (Stove.PCSDK.V3).
  • All fields are public camelCase fields, not properties.
  • If an exception occurs inside the C# wrapper, resultCode is set to BaseSDKResultCode.MANAGED_EXCEPTION (254).

See Also


StoveAPI_FreeStruct

Kind Function · Module Base · Version 3.4.0

Description

If you pass a native structure pointer (ptr) filled with query results such as Base_GetUser, Base_GetGds, Base_GetSignin, Base_GetTraceHint, etc., it releases the native-side resources occupied by that structure.

This function itself has a name that deviates from the Base_ prefix rule, and it is defined exactly as named in the source code. Within BaseAPI.cs, the internal implementation—such as Base_GetUser—calls this function only when stoveDeleter (a native deallocation function pointer) is set in the native structure, and then deallocates the managed buffer (Marshal.FreeHGlobal) as well.

Declaration

csharp
public static void StoveAPI_FreeStruct(IntPtr ptr);

Parameters

NameTypeRequiredDescription
ptrIntPtrYA pointer to the native structure to be unwrapped

Returns

TypeDescription
voidNone

Error Codes

None. This function does not return Result/CallbackResult; if an exception occurs internally, the C# exception is rethrown as-is.

Example

csharp
using static Stove.PCSDK.Base;

// Use this only when dealing directly with native structure pointers.
StoveAPI_FreeStruct(nativePtr);

Notes

See Also


StoveLanguage

Kind Enum · Module Base · Version 3.0.0.4

Description

StoveLanguage is the language value passed when calling Base_SetLanguage. system corresponds to the system language, and the rest refer to individual languages.

Declaration

csharp
public enum StoveLanguage
{
    system = 0,
    en = 1,
    ko = 2,
    ja = 3,
    zh_cn = 4,
    zh_tw = 5,
    de = 6,
    fr = 7,
    es = 8,
    pt = 9,
    th = 10,
    vi = 11,
};

Enum Values

CodeNameDescription
0systemFollows the system language
1enEnglish
2koKorean
3jaJapanese
4zh_cnChinese (Simplified)
5zh_twChinese (Traditional)
6deGerman
7frFrench
8esSpanish
9ptPortuguese
10thThai
11viVietnamese

Example

csharp
using static Stove.PCSDK.Base;

Result result = Base_SetLanguage(StoveLanguage.ko);

if (result.IsSuccessful())
{
    // Please implement the logic for the success case.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • Value names are written in lowercase with underscores. Since this notation differs from that of other SDK enumerations (such as BaseSDKMethod and BaseSDKResultCode), be careful not to confuse them.
  • If you need to specify a language that is not listed here, you should use Base_SetLanguageEx. This function accepts a string instead of StoveLanguage.
  • The four values de, fr, es, and pt were added in v3.4.0. The remaining values have been available since the initial release.

See Also


StoveOverlayMode

Kind Enum · Module Base · Version 3.4.1

Description

StoveOverlayMode is the value of the overlayMode field for StovePCVietnamAgeRatingInfo and StovePCVietnamOverimmersionInfo. The SDK informs the game how to display the Vietnam Age Rating and Excessive Use overlays on the screen.

Declaration

csharp
public enum StoveOverlayMode
{
    SHOW = 0,
    HIDE = 1,
    EXPANDED = 2,
};

Enum Values

CodeNameDescription
0SHOWDisplays the overlay
1HIDEHide the overlay
2EXPANDEDDisplays the overlay in its expanded form

Example

csharp
using static Stove.PCSDK.Base;

void OnVietnamAgeRatingFinished(CallbackResult callbackResult, StovePCVietnamAgeRatingInfo vietnamAgeRatingInfo)
{
    if (callbackResult.result.IsSuccessful())
    {
        if (vietnamAgeRatingInfo.overlayMode == StoveOverlayMode.SHOW)
        {
            // Please implement the logic to display the overlay.
        }
    }
}

Notes

See Also


StovePCBangStatus

Kind Struct · Module PCBang · Version 3.0.2

Description

PCBang_CheckPCBangStatus is a structure passed as a callback that contains information about the current PC Bang status and product code.

This structure is created by the SDK and passed as a callback argument.

Declaration

csharp
public struct StovePCBangStatus
{
    public PCBangPremium premiumStatus;
    public int pcBangSerialNumber;
    public int productCode;
}

Members

NameTypeAccessDescription
premiumStatusPCBangPremiumReadPC Bang This is a premium status.
pcBangSerialNumberintReadThis is the PC Bang seat/session number assigned to the user.
productCodeintReadThere are currently PC Bang product codes available to users.

Example

csharp
void OnCheckStatusFinished(CallbackResult result, StovePCBangStatus status)
{
    if (result.result.IsSuccessful())
    {
        var premium = status.premiumStatus;
        var psn = status.pcBangSerialNumber;
        var productCode = status.productCode;
    }
}

Notes

  • It is passed only to the callback of PCBang_CheckPCBangStatus.
  • It has a similar field structure to StovePCBangUserLogin, but uses productCode instead of remainTime.
  • Since it is a C# struct, no separate creation or destruction procedures are required. The GC manages the memory.

See Also


StovePCBangUserLogin

Kind Struct · Module PCBang · Version 3.0.2

Description

PCBang_UserLogin is the structure passed to the onUserLoginFinished callback when this login is completed.

This structure is created by the SDK and passed as a callback argument.

Declaration

csharp
public struct StovePCBangUserLogin
{
    public PCBangPremium premiumStatus;
    public int pcBangSerialNumber;
    public int remainTime;
}

Members

NameTypeAccessDescription
premiumStatusPCBangPremiumReadPC Bang This is a Premium status.
pcBangSerialNumberintReadThis is the PC Bang seat/session number assigned to the user.
remainTimeintReadTime remaining for paid benefits (in seconds).

Example

csharp
void OnUserLoginFinished(CallbackResult result, StovePCBangUserLogin login)
{
    if (result.result.IsSuccessful())
    {
        var premium = login.premiumStatus;
        var psn = login.pcBangSerialNumber;
        var remainTime = login.remainTime;
    }
}

Notes

  • It is passed only to the onUserLoginFinished callback of PCBang_UserLogin. Subsequent benefit renewal information is passed separately to StovePCRefreshUserBenefits.
  • Since it is a C# struct, no separate creation or destruction procedures are required. The GC manages the memory.

See Also


StovePCChargeInfo

Kind Struct · Module IAP · Version 3.1.0

Description

The element type stored in the StovePCPurchaseResult.chargeInfos array and the IAP_ConfirmPurchase callback's chargeInfos array represents the type and amount of in-game currency deducted as payment for a purchase.

This is an output-only structure that the SDK populates with values and returns via a callback. It is not created directly by the caller.

Declaration

csharp
public struct StovePCChargeInfo

Members

NameTypeDescription
chargeDeductValdoubleThis is the amount that has been deducted.
chargeDisplayDeductValdoubleThis is the deduction amount to be displayed on the screen.
chargeTypeintThis is the code for the type of goods deducted.
chargeTypeNamestringThis is the name of the type of goods that were deducted.

Example

csharp
using static Stove.PCSDK.IAP;

void OnConfirmPurchaseFinished(CallbackResult callbackResult, bool status, StovePCPurchasedProduct[] purchasedProducts, StovePCChargeInfo[] chargeInfos)
{
    if (!callbackResult.result.IsSuccessful())
    {
        return;
    }

    foreach (var charge in chargeInfos)
    {
        // Please implement the logic for displaying deduction details using `charge.chargeTypeName`, `charge.chargeDisplayDeductVal`, and other similar parameters.
    }
}

Notes

See Also


StovePCFetchProductParam

Kind Struct · Module IAP · Version 3.0.0.4

Description

This is an input structure used to specify which category of products to retrieve and in what page increments when calling IAP_FetchProducts / IAP_FetchProductsEx.

The caller populates the value and passes it to the API.

Declaration

csharp
public struct StovePCFetchProductParam

Members

NameTypeRequiredDescription
categoryIdstringYThis is the category ID of the product you want to view.
pageNumberintYThis is the page number to look up.
pageSizeintYThe number of products to display per page.

Example

csharp
using static Stove.PCSDK.IAP;

StovePCFetchProductParam param = new StovePCFetchProductParam();
param.categoryId = "YOUR_CATEGORY_ID";
param.pageNumber = 1;
param.pageSize = 20;

IAP_FetchProducts(param, OnFetchProductsFinished);

Notes

See Also


StovePCGameProfile

Kind Struct · Module Base · Version 3.0.0.4

Description

StovePCGameProfile is a structure passed as an argument when Base_SetGameProfile is called. The game populates it with values and passes it along.

Declaration

csharp
public struct StovePCGameProfile
{
    public string worldId;
    public long characterNumber;
}

Members

NameTypeDescription
worldIdstringWorld ID
characterNumberlongCharacter Number

Example

csharp
using static Stove.PCSDK.Base;

StovePCGameProfile gameProfile = new StovePCGameProfile
{
    worldId = "world_01",
    characterNumber = 12345L
};

Result result = Base_SetGameProfile(gameProfile);

if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • None

See Also


StovePCGds

Kind Struct · Module Base · Version 3.0.0.4

Description

StovePCGds is a structure that Base_GetGds populates and returns. If the caller passes a previously declared variable as ref, the SDK fills in the values.

Declaration

csharp
public struct StovePCGds
{
    public bool isDefault;
    public string nation;
    public string regulation;
    public string timeZone;
    public int utcOffset;
    public string language;
}

Members

NameTypeDescription
isDefaultboolWhether it is the default value
nationstringCountry
regulationstringRegulations
timeZonestringTime Zone
utcOffsetintUTC Offset
languagestringLanguage

Example

csharp
using static Stove.PCSDK.Base;

StovePCGds gds = default;
Result result = Base_GetGds(ref gds);

if (result.IsSuccessful())
{
    // Please implement logic that uses gds.nation, gds.regulation, and so on.
}
else
{
    // Please implement the logic for when a failure occurs.
}

Notes

  • The value will not be populated until Base_GetGds is called.

See Also


StovePCInitializeParam

Kind Struct · Module Base · Version 3.0.0.4

Description

StovePCInitializeParam is a structure passed as an input when calling Base_RestartAppIfNecessary, Base_RestartAppIfNecessaryAsync, Base_RestartAppIfNecessaryAsyncEx, and Base_Initialize. The game fills in the values and passes it.

If you need an extension initialization that requires passing waitTimeMillisec, launchLauncher, and others together, you must use StovePCInitializeParamEx2.

Declaration

csharp
public struct StovePCInitializeParam
{
    public string environment;
    public string gameId;
    public string applicationKey;
}

Members

NameTypeDescription
environmentstringService Environment to Connect To
gameIdstringGame ID
applicationKeystringApplication Key

Example

csharp
using static Stove.PCSDK.Base;

StovePCInitializeParam initParam = new StovePCInitializeParam
{
    environment = "real",
    gameId = "your_game_id",
    applicationKey = "your_application_key"
};

Base_Initialize(initParam, OnInitializeFinished);

Notes

See Also


StovePCInitializeParamEx2

Kind Struct · Module Base · Version 3.4.1

Description

StovePCInitializeParamEx2 is the input structure received by Base_RestartAppIfNecessaryAsyncEx2. In addition to the three fields of StovePCInitializeParam, it combines waitTimeMillisec, launchLauncher, and platformName—which were previously passed as separate parameters—along with five reserved fields into a single structure.

Declaration

csharp
public struct StovePCInitializeParamEx2
{
    public string environment;
    public string gameId;
    public string applicationKey;
    public uint waitTimeMillisec;
    public bool launchLauncher;
    public string platformName;
    public ulong reserved1;
    public ulong reserved2;
    public ulong reserved3;
    public ulong reserved4;
    public ulong reserved5;
}

Members

NameTypeDescription
environmentstringService Environment to Connect To
gameIdstringGame ID
applicationKeystringApplication Key
waitTimeMillisecuintWait Time (milliseconds)
launchLauncherboolWhether to Run the Launcher
platformNamestringPlatform Name
reserved1ulongReservation field. Not in use.
reserved2ulongReservation field. Not in use.
reserved3ulongReservation field. Not in use.
reserved4ulongReservation field. Not in use.
reserved5ulongReservation field. Not in use.

Example

csharp
using static Stove.PCSDK.Base;

StovePCInitializeParamEx2 initParam = new StovePCInitializeParamEx2
{
    environment = "real",
    gameId = "your_game_id",
    applicationKey = "your_application_key",
    waitTimeMillisec = 3000,
    launchLauncher = true,
    platformName = "your_platform_name"
};

Base_RestartAppIfNecessaryAsyncEx2(initParam, OnRestartAppIfNecessaryAsyncFinished);

Notes

See Also


StovePCInventoryItem

Kind Struct · Module IAP · Version 3.0.0.4

Description

This is the type of the elements in the StovePCInventoryItem[] array passed to the IAP_FetchInventory callback. It represents a single item in the user's inventory.

This is an output-only structure that the SDK fills with values and returns via a callback. It is not created directly by the caller.

Declaration

csharp
public struct StovePCInventoryItem

Members

NameTypeDescription
transactionMasterNumberlongThis is the transaction master number.
transactionDetailNumberlongThis is the transaction reference number.
productIdlongThis is the product ID corresponding to the item.
gameItemIdstringThis is the game item ID.
productNamestringThis is the product name.
quantityintThis is the quantity on hand.
thumbnailUrlstringThis is the URL for the thumbnail image.

Example

csharp
using static Stove.PCSDK.IAP;

void OnFetchInventoryFinished(CallbackResult callbackResult, StovePCInventoryItem[] inventoryItems)
{
    if (!callbackResult.result.IsSuccessful())
    {
        return;
    }

    foreach (var item in inventoryItems)
    {
        // Please implement the inventory UI logic using variables such as `item.productName` and `item.quantity`.
    }
}

Notes

  • None.

See Also


StovePCLogSendParam

Kind Struct · Module Log · Version 3.4.1

Description

These are the parameters used in the Log_Send() call. They contain all the values required for a single log entry, including user identification information, marketing integration information, game and server context, and the log group and body.

This is a struct in which the caller fills in the values and passes them directly to Log_Send().

For fields with unknown values in specific log entries, you can leave them at their default values (the number 0, the string null, or an empty value).

Declaration

csharp
public struct StovePCLogSendParam
{
    public long auid;
    public long cuid;
    public string mktType1;
    public string mktId1;
    public string mktType2;
    public string mktId2;
    public string gameVersion;
    public string logGroupId;
    public string serverCd;
    public string serverCdDet;
    public string lvCd;
    public string lvCdDet;
    public string contents;
}

Members

User Identification

NameTypeAccessDescription
auidlongReading and WritingThis is the account UID (STOVE account identifier).
cuidlongReading and WritingThis is the character UID (in-game character identifier).

Marketing Integration Information

NameTypeAccessDescription
mktType1stringReading and WritingThis is the name of the integrated third-party marketing service (Slot 1).
mktId1stringReading and WritingThis is an identifier (campaign/referrer ID) issued by Slot 1 Marketing Services.
mktType2stringReading and WritingThis is the name of the integrated third-party marketing service (Slot 2).
mktId2stringReading and WritingThis is an identifier (campaign/referrer ID) issued by Slot 2 Marketing Services.

mktType1/mktId1 and mktType2/mktId2 are two independent slots. Since they do not have a primary/fallback relationship, only the corresponding slot should be filled in.

Game · Server Context

NameTypeAccessDescription
gameVersionstringReading and WritingThis is the game client version string (e.g., "1.2.3").
serverCdstringReading and WritingThis is the server code (the world/region server the user is connected to).
serverCdDetstringReading and WritingDetails of the server code (sub-servers, channels, and shards under serverCd).
lvCdstringReading and WritingThis is the account level at the time the log entry was recorded.
lvCdDetstringReading and WritingThis is the character's level at the time the log was recorded.

lvCdDet is not a subentry of lvCd, despite the "Det" suffix in its name. It is the character range value corresponding to lvCd (account range).

Log Group · Main Text

NameTypeAccessDescription
logGroupIdstringReading and WritingA correlation ID that groups related log entries together. Entries with the same value are treated as a single logical set by the log backend.
contentsstringReading and WritingThis is a free-form log payload (typically a JSON document string) that contains values not covered by the above field types. It corresponds to the action_param field in the legacy 81plug.

Example

csharp
var logSendParam = new StovePCLogSendParam
{
    auid = auid,
    cuid = cuid,
    gameVersion = "1.2.3",
    contents = "{\"event\":\"login\"}"
};

Log_Send(logSendParam, OnLogSendFinished);

Notes

  • It is used only as an input parameter for Log_Send().
  • Fields without values can be left with their default values (the number 0, the string null, or an empty value).
  • Since it is a C# struct, no separate creation or destruction procedures are required. The garbage collector manages the memory.
  • The logging feature was added to the entire module in version 3.4.1.

See Also


StovePCOrderProduct

Kind Struct · Module IAP · Version 3.0.0.4

Description

StovePCStartPurchaseParam.products is the element type of the array; it is an input structure that specifies the product ID, quantity, and selling price for a purchase request.

The caller fills in the values and passes them to IAP_StartPurchase / IAP_StartPurchaseEx.

Declaration

csharp
public struct StovePCOrderProduct

Members

NameTypeRequiredDescription
productIdlongYThis is the ID of the item you are purchasing.
salePricedoubleYThis is the selling price of the product.
quantityintYThe number of items to purchase.

Example

csharp
using static Stove.PCSDK.IAP;

StovePCOrderProduct orderProduct = new StovePCOrderProduct();
orderProduct.productId = 123456;
orderProduct.salePrice = 1000;
orderProduct.quantity = 1;

Notes

  • salePrice must return the same value as StovePCProduct.salePrice, which is the product search result, in order to pass the server-side price validation.

See Also


StovePCOverImmersion

Kind Struct · Module Base · Version 3.0.0.4

Description

StovePCOverImmersion is a structure passed by the OnOverImmersionFinished callback registered with Base_OverImmersionNotification. The SDK populates the values and passes them to the callback.

Declaration

csharp
public struct StovePCOverImmersion
{
    public string warningMessage;
    public int elapsedTimeInHours;
    public int minExposureTimeInSeconds;
}

Members

NameTypeDescription
warningMessagestringWarning Message
elapsedTimeInHoursintCumulative Usage Time (in hours)
minExposureTimeInSecondsintMinimum exposure time (in seconds)

Example

csharp
using static Stove.PCSDK.Base;

void OnOverImmersionFinished(CallbackResult callbackResult, StovePCOverImmersion overImmersion)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic to display warnings using `overImmersion.warningMessage` and similar methods.
    }
}

Base_OverImmersionNotification(OnOverImmersionFinished);

Notes

See Also


StovePCPaymentOperation

Kind Enum · Module IAP · Version 3.0.0.4 · Deprecated

Description

This is a deprecated value specific to IAP_StartPayment. If you are not using IAP_StartPayment, do not use this value either.

This value is assigned to the StovePCPaymentOption.operation field and specifies how the payment web view popup behaves when IAP_StartPayment / IAP_StartPaymentEx is called.

This value indicates the operating mode, not whether the operation was successful or failed.

Declaration

csharp
public enum StovePCPaymentOperation
{
    DEFAULT = 0,
    WITH_WEBVIEW,
    _MAX_COUNT
}

Enum Values

CodeNameDescription
0DEFAULTProceed with payment using the default action.
1WITH_WEBVIEWWe process payments using WebView.
2_MAX_COUNTNot used (internal threshold value indicating the number of values)

Example

csharp
using static Stove.PCSDK.IAP;

StovePCPaymentOption option = new StovePCPaymentOption();
option.operation = StovePCPaymentOperation.WITH_WEBVIEW;

Notes

See Also


StovePCPaymentOption

Kind Struct · Module IAP · Version 3.0.0.4 · Deprecated

Description

This is a deprecated structure specific to IAP_StartPayment. Please use IAP_StartPurchase, which uses StovePCPurchaseOption, instead.

This is an input structure that specifies the behavior, position, and size of the payment web view pop-up when calling IAP_StartPayment / IAP_StartPaymentEx.

The caller passes the value by reference.

Declaration

csharp
public struct StovePCPaymentOption

Members

NameTypeRequiredDescription
operationStovePCPaymentOperationYHere's how the payment pop-up works.
webviewModeWebViewModeYSpecifies whether the WebView should be displayed externally or internally.
webviewPosXintYThis is the X-coordinate of the WebView popup.
webviewPosYintYThis is the Y coordinate of the WebView popup.
webviewWidthintYThis is the width of the WebView popup.
webviewHeightintYThis is the height of the WebView popup.

Example

csharp
using static Stove.PCSDK.Base;
using static Stove.PCSDK.IAP;

StovePCPaymentOption option = new StovePCPaymentOption();
option.operation = StovePCPaymentOperation.WITH_WEBVIEW;
option.webviewMode = WebViewMode.INTERNAL;
option.webviewPosX = 0;
option.webviewPosY = 0;
option.webviewWidth = 800;
option.webviewHeight = 600;

Notes

See Also


StovePCPopupDisallowed

Kind Struct · Module View · Version 3.0.0.4

Description

This is the input parameter for View_SetPopupDisallowed. It specifies how many days to hide a pop-up.

The caller creates an object with the field values and passes it directly to View_SetPopupDisallowed. Since it is a value type (struct), it is managed by the garbage collector, and there is no API for creating or destroying it separately.

Declaration

csharp
public struct StovePCPopupDisallowed
{
    public uint popupId;
    public uint days;
}

Members

NameTypeDescription
popupIduintThis is the identifier for the pop-up to be hidden.
daysuintThe number of days for which the pop-up will be hidden.

Example

csharp
var popupDisallowed = new StovePCPopupDisallowed
{
    popupId = 1001,
    days = 7,
};

// Call View_SetPopupDisallowed(popupDisallowed, ...);.

Notes

  • Since it is a value type (struct), there is no need to free it separately after the API call is complete.
  • popupId is not a value obtained through an SDK call. The callbacks for the AutoPopup, ManualPopup, NewsPopup, and CouponPopup API families do not return a popup identifier, and the block status is stored only in the client’s local database—not via a server API. Therefore, the game (Studio) must separately know the identifier assigned when the popup was registered in order to populate this value.

See Also


StovePCProduct

Kind Struct · Module IAP · Version 3.0.0.4 · Deprecated

Description

This is the callback type for the deprecated IAP_FetchProducts base class. Please use IAP_FetchProductsEx, which uses StovePCProductEx instead.

This is the element type of the StovePCProduct[] array passed to the callback of IAP_FetchProducts. It contains basic product information, price and discount information, and quantity and purchase limit information. It has 31 fields.

StovePCProductEx is an extended version of this structure that adds an availability code (purchaseAvailabilityCode) to all fields. IAP_FetchProducts uses StovePCProduct, and IAP_FetchProductsEx uses StovePCProductEx. Both APIs have the same input parameter (StovePCFetchProductParam); only the return type differs. Since IAP_FetchProducts has been deprecated, please always use IAP_FetchProductsEx for actual integration.

This is an output-only structure that the SDK populates with values and returns via a callback. It is not created directly by the caller.

Declaration

csharp
public struct StovePCProduct

Members

Basic Information

NameTypeDescription
productIdlongThis is the product ID.
gameItemIdstringThis is the game item ID.
namestringThis is the product name.
descriptionstringProduct description.
quantityintThis is the quantity supplied per item.
productTypeCodeProductTypeCodeProduct Categories.
categoryIdstringThis is the category ID for the product.
categoryNamestringThis is the name of the category to which the product belongs.
thumbnailUrlstringThis is the URL for the thumbnail image.

Pricing and Discount Information

NameTypeDescription
currencyCodestringThis is the country code.
pricedoubleThis is the list price.
displayPricedoubleThis is the list price to be displayed on the screen.
displayPriceStringstringThis is the list of regular prices to be displayed on the screen.
salePricedoubleThis is the selling price.
displaySalePricedoubleThis is the selling price to be displayed on the screen.
displaySalePriceStringstringThis is the sales price string to be displayed on the screen.
isDiscountboolWhether it's on sale.
discountTypeDiscountTypeThis is the discount method (fixed percentage/fixed amount).
discountTypeValueintThis is the discount rate or discount amount.
discountBeginDatelongThe sale is about to begin.
discountEndDatelongThe discount is about to end.

Information on Quantity and Purchase Limits

NameTypeDescription
totalQuantityintThis is the total number of items available for sale.
memberQuantityintThis is the maximum quantity that can be sold per member (account).
guidQuantityintThis is the available quantity for sale per GUID (character).
canWithdrawboolWhether the product is eligible for a refund (cancellation).
purchasedAtLeastOnceboolThis indicates whether this user has ever made a purchase.
purchaseLimitTypeCodePurchaseLimitTypeCodeThese are the purchase restriction criteria (for members, characters, etc.).
purchaseLimitCountintThis is the purchase limit.
saleLimitCountintThis is the sales limit.
saleBeginDatelongIt's time for the sale to begin.
saleEndDatelongIt is now time for the sale to end.

Example

csharp
using static Stove.PCSDK.IAP;

void OnFetchProductsFinished(CallbackResult callbackResult, StovePCProduct[] products)
{
    if (!callbackResult.result.IsSuccessful())
    {
        return;
    }

    foreach (var product in products)
    {
        // Please implement the product list UI logic using `product.name`, `product.displaySalePriceString`, and similar properties.
    }
}

Notes

  • isDiscount is valid only when true; in that case, discountType, discountTypeValue, discountBeginDate, and discountEndDate are valid.
  • When submitting a purchase request (StovePCOrderProduct), you must pass salePrice as-is.

See Also


StovePCProductEx

Kind Struct · Module IAP · Version 3.4.1

Description

This is the element type of the StovePCProductEx[] array passed to the callback of IAP_FetchProductsEx. It retains all 31 fields of StovePCProduct and includes the purchaseAvailabilityCode field, for a total of 32 fields.

StovePCProduct and StovePCProductEx are different structures and cannot be converted to one another. IAP_FetchProducts uses StovePCProduct, and IAP_FetchProductsEx uses StovePCProductEx. The input parameters (StovePCFetchProductParam) for both APIs are the same.

This is an output-only struct that the SDK populates with values and returns via a callback. It is not created directly by the caller.

Declaration

csharp
public struct StovePCProductEx

Members

Basic Information

NameTypeDescription
productIdlongThis is the product ID.
gameItemIdstringThis is the game item ID.
namestringThis is the product name.
descriptionstringProduct description.
quantityintThis is the quantity supplied per item.
productTypeCodeProductTypeCodeProduct Categories.
categoryIdstringThis is the category ID for the product.
categoryNamestringThis is the name of the category to which the product belongs.
thumbnailUrlstringThis is the URL for the thumbnail image.

Pricing and Discount Information

NameTypeDescription
currencyCodestringThis is the country code.
pricedoubleThis is the list price.
displayPricedoubleThis is the list price to be displayed on the screen.
displayPriceStringstringThis is the list price text to display on the screen.
salePricedoubleThis is the selling price.
displaySalePricedoubleThis is the selling price to be displayed on the screen.
displaySalePriceStringstringThis is the sales price string to be displayed on the screen.
isDiscountboolWhether it's on sale.
discountTypeDiscountTypeThis is the discount method (fixed percentage/fixed amount).
discountTypeValueintThis is the discount rate or discount amount.
discountBeginDatelongThe sale is about to begin.
discountEndDatelongThe discount is about to end.

Information on Quantity and Purchase Limits

NameTypeDescription
totalQuantityintThis is the total available quantity for sale.
memberQuantityintThis is the available quantity for sale per member (account).
guidQuantityintThis is the available quantity for sale per GUID (character).
canWithdrawboolWhether the product is eligible for a refund (cancellation).
purchasedAtLeastOnceboolThis refers to whether this user has ever made a purchase.
purchaseLimitTypeCodePurchaseLimitTypeCodeThese are the purchase restriction criteria (for members, characters, etc.).
purchaseLimitCountintThis is the purchase limit.
saleLimitCountintThis is the sales limit.
saleBeginDatelongIt's time for the sale to begin.
saleEndDatelongIt is now the end of the sale.

Availability (Ex: Extended Field)**

NameTypeDescription
purchaseAvailabilityCodeshortThis code indicates whether this product is currently available for purchase.

Example

csharp
using static Stove.PCSDK.IAP;

void OnFetchProductsExFinished(CallbackResult callbackResult, StovePCProductEx[] products)
{
    if (!callbackResult.result.IsSuccessful())
    {
        return;
    }

    foreach (var product in products)
    {
        // First, check purchase availability using `product.purchaseAvailabilityCode`, and then
        // Please implement the product list UI logic using variables such as `product.name` and `product.displaySalePriceString`.
    }
}

Notes

  • The meanings of the remaining fields, excluding purchaseAvailabilityCode, are the same as those of StovePCProduct.
  • isDiscount is valid only when true; in that case, discountType, discountTypeValue, discountBeginDate, and discountEndDate are valid.

See Also


StovePCPurchasedProduct

Kind Struct · Module IAP · Version 3.1.0

Description

The element type contained in the StovePCPurchaseResult.purchasedProducts array and the IAP_ConfirmPurchase callback's purchasedProducts array, which represents the detailed quantity information for items that have actually been purchased.

This is an output-only structure that the SDK populates with values and returns via a callback. It is not created directly by the caller.

Declaration

csharp
public struct StovePCPurchasedProduct

Members

NameTypeDescription
transactionDetailNumberlongThis is the transaction reference number.
productIdlongThis is the ID of the purchased item.
categoryIdstringThis is the category ID for the product.
totalQuantityintThis is the total quantity dispensed.
memberQuantityintThis is the quantity issued per member (account).
guidQuantityintThis is the quantity issued per GUID (character).

Example

csharp
using static Stove.PCSDK.IAP;

void OnConfirmPurchaseFinished(CallbackResult callbackResult, bool status, StovePCPurchasedProduct[] purchasedProducts, StovePCChargeInfo[] chargeInfos)
{
    if (!callbackResult.result.IsSuccessful())
    {
        return;
    }

    foreach (var purchased in purchasedProducts)
    {
        // Please implement the payment processing logic using variables such as `purchased.productId` and `purchased.totalQuantity`.
    }
}

Notes

See Also


StovePCPurchaseOperation

Kind Enum · Module IAP · Version 3.0.0.4

Description

This value is assigned to the StovePCPurchaseOption.operation field and specifies how the purchase webview popup behaves when the IAP_StartPurchase / IAP_StartPurchaseEx function is called.

This value indicates the operating mode, not whether the operation was successful or failed.

Declaration

csharp
public enum StovePCPurchaseOperation
{
    DEFAULT = 0,
    WITH_WEBVIEW,
    WITH_WEBVIEW_AND_CONFIRM_RESULT,
    _MAX_COUNT
}

Enum Values

CodeNameDescription
0DEFAULTProceed with the purchase using the default action
1WITH_WEBVIEWUse the Web View to complete the purchase.
2WITH_WEBVIEW_AND_CONFIRM_RESULTUse the WebView and complete the purchase, including the step to review the results.
3_MAX_COUNTNot used (internal boundary value indicating the number of values)

Example

csharp
using static Stove.PCSDK.IAP;

StovePCPurchaseOption option = new StovePCPurchaseOption();
option.operation = StovePCPurchaseOperation.WITH_WEBVIEW;

Notes

See Also


StovePCPurchaseOption

Kind Struct · Module IAP · Version 3.0.0.4

Description

This is an input structure stored in the StovePCStartPurchaseParam.option field that specifies the behavior, position, and size of the purchase webview popup when IAP_StartPurchase / IAP_StartPurchaseEx is called.

The caller passes the value by reference.

Declaration

csharp
public struct StovePCPurchaseOption

Members

NameTypeRequiredDescription
operationStovePCPurchaseOperationYHere's how the purchase pop-up works.
webviewModeWebViewModeYSpecifies whether to display the WebView externally or internally.
webviewPosXintYThis is the X coordinate of the WebView popup.
webviewPosYintYThis is the Y-coordinate of the WebView popup.
webviewWidthintYThis is the width of the WebView pop-up.
webviewHeightintYThis is the height of the WebView popup.

Example

csharp
using static Stove.PCSDK.Base;
using static Stove.PCSDK.IAP;

StovePCPurchaseOption option = new StovePCPurchaseOption();
option.operation = StovePCPurchaseOperation.WITH_WEBVIEW;
option.webviewMode = WebViewMode.INTERNAL;
option.webviewPosX = 0;
option.webviewPosY = 0;
option.webviewWidth = 800;
option.webviewHeight = 600;

Notes

See Also


StovePCPurchaseResult

Kind Struct · Module IAP · Version 3.0.0.4

Description

This is the purchase processing result passed as a callback from IAP_StartPurchase / IAP_StartPurchaseEx. It contains the transaction number, whether an additional payment window is required, and details of the items actually purchased and the in-game currency deducted.

This is an output-only structure that the SDK fills with values and returns via a callback. It is not created directly by the caller.

Declaration

csharp
public struct StovePCPurchaseResult

Members

NameTypeDescription
transactionMasterNumberlongThis is the transaction master number.
transactionDetailNumberslong[]This is a list of transaction reference numbers.
oneTimePaymentUrlstringThis is a one-time payment URL used when you need to open an additional payment window.
purchaseProgressPurchaseProgressIndicates whether an additional payment window should be displayed.
purchasedboolWhether the purchase has been completed.
extraDatastringThe value passed to StovePCStartPurchaseParam.extraData is returned exactly as it was.
purchasedProductsStovePCPurchasedProduct[]This is a list of items that were actually delivered.
chargeInfosStovePCChargeInfo[]This is a list of the goods deducted as payment for the purchase.

Example

csharp
using static Stove.PCSDK.IAP;

void OnStartPurchaseFinished(CallbackResult callbackResult, StovePCPurchaseResult purchase)
{
    if (!callbackResult.result.IsSuccessful())
    {
        return;
    }

    if (purchase.purchaseProgress == PurchaseProgress.NEED_PAYMENT_WINDOW)
    {
        // Please implement the logic to display the payment window using `purchase.oneTimePaymentUrl`.
    }
    else if (purchase.purchased)
    {
        // Please implement the payment processing logic in `purchase.purchasedProducts`.
    }
}

Notes

  • If purchaseProgress is NEED_PAYMENT_WINDOW, you must check oneTimePaymentUrl.
  • This structure is independent of the result of IAP_ConfirmPurchase. IAP_ConfirmPurchase returns purchasedProducts and chargeInfos as separate callback arguments.

See Also


StovePCRefreshUserBenefits

Kind Struct · Module PCBang · Version 3.0.2

Description

This is a structure that is passed to the onRefreshBenefitsFinished callback every 4 minutes after a successful PCBang_UserLogin login.

This structure is created by the SDK and passed as a callback argument.

This is a different structure from the initial login result (StovePCBangUserLogin).

Declaration

csharp
public struct StovePCRefreshUserBenefits
{
    public PCBangPremium premiumStatus;
    public int remainTime;
}

Members

NameTypeAccessDescription
premiumStatusPCBangPremiumReadPC Bang This is a Premium status.
remainTimeintReadTime remaining for your paid benefits (in seconds).

Example

csharp
void OnRefreshBenefitsFinished(CallbackResult result, StovePCRefreshUserBenefits benefits)
{
    if (result.result.IsSuccessful())
    {
        var premium = benefits.premiumStatus;
        var remainTime = benefits.remainTime;
    }
}

Notes

  • It is passed repeatedly every 4 minutes only to the onRefreshBenefitsFinished callback of PCBang_UserLogin.
  • It has a similar field structure to StovePCBangUserLogin, but does not include the pcBangSerialNumber field.
  • Since it is a C# struct, no separate creation or destruction procedures are required. The GC manages the memory.

See Also


StovePCShopCategory

Kind Struct · Module IAP · Version 3.0.0.4

Description

This is the element type of the StovePCShopCategory[] array passed as a callback to IAP_FetchShopCategories. It represents a single category registered in the store.

This is an output-only structure that the SDK populates with values via a callback and returns. The caller does not create it directly.

Declaration

csharp
public struct StovePCShopCategory

Members

NameTypeDescription
categoryIdstringThis is the category ID.
parentCategoryIdstringThis is the parent category ID. If this is the top-level category, the value may be empty.
displayNumberintThis is the order in which categories are displayed.
namestringThis is the category name.
depthintThis is the depth in the category tree.

Example

csharp
using static Stove.PCSDK.IAP;

void OnFetchShopCategoriesFinished(CallbackResult callbackResult, StovePCShopCategory[] shopCategories)
{
    if (!callbackResult.result.IsSuccessful())
    {
        return;
    }

    foreach (var category in shopCategories)
    {
        // Please implement logic that uses category.categoryId, category.name, and so on.
    }
}

Notes

  • You can use parentCategoryId and depth to create a category tree structure.

See Also


StovePCShutdown

Kind Struct · Module Base · Version 3.0.0.4

Description

StovePCShutdown is a structure passed by the OnShutdownFinished callback registered as Base_ShutdownNotification. The SDK populates the values and passes them to the callback.

Declaration

csharp
public struct StovePCShutdown
{
    public string shutdownMessage;
    public int exposureTimeInSeconds;
    public int inadvanceTimeInMinutes;
}

Members

NameTypeDescription
shutdownMessagestringShutdown Notice
exposureTimeInSecondsintExposure time (in seconds)
inadvanceTimeInMinutesintTime remaining until shutdown (in minutes)

Example

csharp
using static Stove.PCSDK.Base;

void OnShutdownFinished(CallbackResult callbackResult, StovePCShutdown shutdown)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic to display a message using `shutdown`, `shutdownMessage`, and similar functions.
    }
}

Base_ShutdownNotification(OnShutdownFinished);

Notes

  • This structure is not created directly by the game; it is passed only via the Base_ShutdownNotification callback.
  • If an account is subject to a shutdown, this callback will be triggered even from overseas. This is not a feature exclusive to South Korea.

See Also


StovePCSignin

Kind Struct · Module Base · Version 3.0.0.4

Description

StovePCSignin is a structure that is filled in and returned by Base_GetSignin. When the caller passes a previously declared variable as ref, the SDK fills in the values.

Declaration

csharp
public struct StovePCSignin
{
    public bool personVerify;
    public bool emailVerify;
    public string nationality;
    public string providerCode;
    public int accountType;
}

Members

NameTypeDescription
personVerifyboolWhether Identity Verification Has Been Completed
emailVerifyboolEmail Verification Status
nationalitystringNationality
providerCodestringLogin Provider Code
accountTypeintAccount Type

Example

csharp
using static Stove.PCSDK.Base;

StovePCSignin signin = default;
Result result = Base_GetSignin(ref signin);

if (result.IsSuccessful())
{
    // Please implement logic that uses `signin.personVerify`, `signin.nationality`, and so on.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

See Also


StovePCStartPurchaseParam

Kind Struct · Module IAP · Version 3.0.0.4

Description

This is an input structure used to specify the list of items to purchase, pop-up options, service transaction numbers, and additional data when making a IAP_StartPurchase / IAP_StartPurchaseEx call.

The caller passes the value by reference.

Declaration

csharp
public struct StovePCStartPurchaseParam

Members

NameTypeRequiredDescription
productsStovePCOrderProduct[]YHere is a list of items to purchase.
productsSizeuintYproducts is the number of elements in the array.
optionStovePCPurchaseOptionYHow the purchase pop-up works, as well as its position and size.
serviceTxnNostringYThis is a transaction number issued by the game (service).
extraDatastringYThis is bonus data that can be used freely in the game. Upon completion of the purchase, it will revert to StovePCPurchaseResult.extraData.

Example

csharp
using static Stove.PCSDK.Base;
using static Stove.PCSDK.IAP;

StovePCOrderProduct orderProduct = new StovePCOrderProduct();
orderProduct.productId = 123456;
orderProduct.salePrice = 1000;
orderProduct.quantity = 1;

StovePCPurchaseOption option = new StovePCPurchaseOption();
option.operation = StovePCPurchaseOperation.WITH_WEBVIEW;
option.webviewMode = WebViewMode.INTERNAL;
option.webviewWidth = 800;
option.webviewHeight = 600;

StovePCStartPurchaseParam purchaseParam = new StovePCStartPurchaseParam();
purchaseParam.products = new StovePCOrderProduct[] { orderProduct };
purchaseParam.productsSize = 1;
purchaseParam.option = option;
purchaseParam.serviceTxnNo = "YOUR_SERVICE_TXN_NO";
purchaseParam.extraData = "";

IAP_StartPurchase(purchaseParam, OnStartPurchaseFinished);

Notes

  • productsSize must match the actual length of the products array.
  • Since extraData is preserved and returned until the purchase completion callback, it can be used to link the request and the result.

See Also


StovePCTermsOperation

Kind Enum · Module IAP · Version 3.0.0.4

Description

This value is assigned to the StovePCTermsOption.operation field and specifies how the terms and conditions agreement web view pop-up behaves when IAP_FetchTermsAgreement / IAP_FetchTermsAgreementEx is called.

This value indicates the operating mode, not success or failure.

Declaration

csharp
public enum StovePCTermsOperation
{
    DEFAULT = 0,
    WITH_WEBVIEW,
    _MAX_COUNT
}

Enum Values

CodeNameDescription
0DEFAULTBy default, the system checks whether you have agreed to the terms and conditions.
1WITH_WEBVIEWWe use a web view to process the terms and conditions agreement.
2_MAX_COUNTNot used (internal boundary value indicating the number of values)

Example

csharp
using static Stove.PCSDK.IAP;

StovePCTermsOption option = new StovePCTermsOption();
option.operation = StovePCTermsOperation.WITH_WEBVIEW;

Notes

See Also


StovePCTermsOption

Kind Struct · Module IAP · Version 3.0.0.4

Description

This is an input structure that specifies the behavior, position, and size of the web view pop-up for agreeing to the terms and conditions when IAP_FetchTermsAgreement / IAP_FetchTermsAgreementEx is called.

The caller passes the value by reference.

Declaration

csharp
public struct StovePCTermsOption

Members

NameTypeRequiredDescription
operationStovePCTermsOperationYHere's how the Terms of Service consent pop-up works.
webviewModeWebViewModeYSpecifies whether to display the WebView externally or internally.
webviewPosXintYThis is the X coordinate of the WebView popup.
webviewPosYintYThis is the Y-coordinate of the WebView popup.
webviewWidthintYThis is the width of the WebView popup.
webviewHeightintYThis is the height of the WebView popup.

Example

csharp
using static Stove.PCSDK.Base;
using static Stove.PCSDK.IAP;

StovePCTermsOption option = new StovePCTermsOption();
option.operation = StovePCTermsOperation.WITH_WEBVIEW;
option.webviewMode = WebViewMode.INTERNAL;
option.webviewPosX = 0;
option.webviewPosY = 0;
option.webviewWidth = 800;
option.webviewHeight = 600;

Notes

See Also


StovePCToken

Kind Struct · Module Base · Version 3.0.0.4

Description

StovePCToken is a structure passed by the OnRenewTokenFinished callback registered as Base_AccessTokenRenewed. The SDK populates the values and passes them to the callback.

Declaration

csharp
public struct StovePCToken
{
    public string accessToken;
    public int expireIn;
}

Members

NameTypeDescription
accessTokenstringRenewed Access Token
expireInintExpiration Time

Example

csharp
using static Stove.PCSDK.Base;

void OnRenewTokenFinished(CallbackResult callbackResult, StovePCToken token)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement logic that uses `token.accessToken` and `token.expireIn`.
    }
}

Base_AccessTokenRenewed(OnRenewTokenFinished);

Notes

  • Base_GetAccessToken returns the string directly, rather than this structure. StovePCToken is passed only as a callback when the token is renewed.

See Also


StovePCTraceHint

Kind Struct · Module Base · Version 3.0.0.4 · Deprecated

Description

This feature is deprecated. It is not available in the new interface either.

StovePCTraceHint is a structure that is filled in and returned by Base_GetTraceHint. If the caller passes a previously declared variable as ref, the SDK fills in the values.

Declaration

csharp
public struct StovePCTraceHint
{
    public string sessionId;
    public string refSessionId;
    public string uuid;
    public string serviceProtocol;
    public string refSourceType;
}

Members

NameTypeDescription
sessionIdstringSession ID
refSessionIdstringReference Session ID
uuidstringUUID
serviceProtocolstringService Protocol
refSourceTypestringReference Source Type

Example

csharp
using static Stove.PCSDK.Base;

StovePCTraceHint traceHint = default;
Result result = Base_GetTraceHint(ref traceHint);

if (result.IsSuccessful())
{
    // Please implement logic to log items such as `traceHint.sessionId`.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

See Also


StovePCUser

Kind Struct · Module Base · Version 3.0.0.4

Description

StovePCUser is a structure that is filled in and returned by Base_GetUser. If the caller passes a previously declared variable as ref, the SDK fills in the values.

Declaration

csharp
public struct StovePCUser
{
    public string nickname;
    public ulong gameUserId;
}

Members

NameTypeDescription
nicknamestringNickname
gameUserIdulongGame User ID

Example

csharp
using static Stove.PCSDK.Base;

StovePCUser user = default;
Result result = Base_GetUser(ref user);

if (result.IsSuccessful())
{
    // Please implement the logic that uses `user.nickname` and `user.gameUserId`.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • The value will not be populated until Base_GetUser is called.

See Also


StovePCVietnamAgeRatingInfo

Kind Struct · Module Base · Version 3.4.1

Description

StovePCVietnamAgeRatingInfo is a structure passed by the OnVietnamAgeRatingFinished callback registered as Base_VietnamAgeRatingNotification. The SDK populates the values and passes them to the callback.

Declaration

csharp
public struct StovePCVietnamAgeRatingInfo
{
    public StoveOverlayMode overlayMode;
    public int overlayType;
    public float overlayScale;
    public float overlayOpacity;
    public int ageRating;
    public string message;
    public float displayPositionX;
    public float displayPositionY;
    public string language;
}

Members

NameTypeDescription
overlayModeStoveOverlayModeOverlay Display Mode
overlayTypeintOverlay Type
overlayScalefloatOverlay Size Ratio
overlayOpacityfloatOverlay Transparency
ageRatingintAge Rating
messagestringDisplay Message
displayPositionXfloatDisplay Position X-Coordinate
displayPositionYfloatDisplay Position Y-Coordinate
languagestringLanguage

Example

csharp
using static Stove.PCSDK.Base;

void OnVietnamAgeRatingFinished(CallbackResult callbackResult, StovePCVietnamAgeRatingInfo vietnamAgeRatingInfo)
{
    if (callbackResult.result.IsSuccessful())
    {
        // such as vietnamAgeRatingInfo.message, vietnamAgeRatingInfo.ageRating, etc.
        // Please implement the logic for drawing overlays.
    }
}

Base_VietnamAgeRatingNotification(OnVietnamAgeRatingFinished);

Notes

  • This structure is not created directly by the game; it is passed only via the Base_VietnamAgeRatingNotification callback.
  • This callback must be registered after rendering is possible.

See Also


StovePCVietnamOverimmersionInfo

Kind Struct · Module Base · Version 3.4.1

Description

StovePCVietnamOverimmersionInfo is a structure passed by the OnVietnamOverimmersionFinished callback registered as Base_VietnamOverimmersionNotification. The SDK populates the values and passes them to the callback.

Declaration

csharp
public struct StovePCVietnamOverimmersionInfo
{
    public StoveOverlayMode overlayMode;
    public int overlayType;
    public float overlayScale;
    public float overlayOpacity;
    public int ageRating;
    public string message;
    public string styledMessage;
    public int elapsedTime;
    public int exposureTime;
    public float expandAnimationTime;
    public float displayPositionX;
    public float displayPositionY;
    public string language;
}

Members

NameTypeDescription
overlayModeStoveOverlayModeOverlay Display Mode
overlayTypeintOverlay Type
overlayScalefloatOverlay Size Ratio
overlayOpacityfloatOverlay Transparency
ageRatingintAge Rating
messagestringDisplay Message
styledMessagestringDisplay message with applied style
elapsedTimeintTotal Usage Time
exposureTimeintExposure Time
expandAnimationTimefloatExpansion Animation Duration
displayPositionXfloatDisplay Position X Coordinate
displayPositionYfloatDisplay Position Y Coordinate
languagestringLanguage

Example

csharp
using static Stove.PCSDK.Base;

void OnVietnamOverimmersionFinished(CallbackResult callbackResult, StovePCVietnamOverimmersionInfo vietnamOverimmersionInfo)
{
    if (callbackResult.result.IsSuccessful())
    {
        // such as vietnamOverimmersionInfo.message, vietnamOverimmersionInfo.styledMessage, etc.
        // Please implement the logic for drawing overlays.
    }
}

Base_VietnamOverimmersionNotification(OnVietnamOverimmersionFinished);

Notes

  • This structure is not created directly by the game; it is passed only via the Base_VietnamOverimmersionNotification callback.
  • This callback must be registered after rendering is possible.

See Also


StovePCVoidedPurchase

Kind Struct · Module IAP · Version 3.0.0.4 · Deprecated

Description

The refund inquiry feature has been deprecated. It is not available in the new interface.

This is the element type of the StovePCVoidedPurchase[] array passed as a callback to IAP_FetchVoidedPurchases. It represents a single purchase record that has been canceled (refunded) on the marketplace.

This is an output-only structure that the SDK populates with values and returns via a callback. It is not created directly by the caller.

Declaration

csharp
public struct StovePCVoidedPurchase

Members

NameTypeDescription
tidlongThis is the transaction ID.
marketCodestringThis is the marketplace code where the purchase took place.
productIdstringThis is the product ID.
marketProductIdstringThis is the product ID used in the marketplace.
userIdstringThis is the user ID.
characterNolongThis is the character number.
purchaseMillislongThis is the purchase time (in milliseconds).
voidedMillislongThis is the time (in milliseconds) when the cancellation was processed.

Example

csharp
using static Stove.PCSDK.IAP;

void OnFetchVoidedPurchasesFinished(CallbackResult callbackResult, StovePCVoidedPurchase[] voidedPurchase)
{
    if (!callbackResult.result.IsSuccessful())
    {
        return;
    }

    foreach (var voided in voidedPurchase)
    {
        // Please implement the logic for handling canceled payments using `voided.productId`, `voided.voidedMillis`, and similar variables.
    }
}

Notes

See Also


StovePCVoidedPurchasesEx

Kind Struct · Module IAP · Version 3.4.1 · Deprecated

Description

This type is not currently supported by the SDK. The IAP_FetchVoidedPurchasesEx() function, which used this structure, is also not supported. The refund inquiry feature itself has been deprecated.

This is the element type of the StovePCVoidedPurchasesEx[] array passed to the callback of IAP_FetchVoidedPurchasesEx. It serves the same purpose as StovePCVoidedPurchase, but provides additional fields such as membership number (memberNo), GUID, and market transaction ID.

This is an output-only structure that the SDK populates with values and returns via a callback. It is not created directly by the caller.

Declaration

csharp
public struct StovePCVoidedPurchasesEx

Members

NameTypeDescription
tidlongThis is the transaction ID.
marketCodestringThis is the marketplace code where the purchase was made.
memberNolongThis is your membership number.
guidstringThis is a GUID (character identifier).
characterNolongThis is the character number.
inserviceItemIdstringThis is the item ID within the service.
marketItemIdstringThis is the item ID used in the Market.
marketTidstringThis is the transaction ID from the marketplace.
marketUserIdstringThis is the user ID for the marketplace.
purchaseDtlongThis is the time of purchase.
voidedDtlongThis is the time the cancellation was processed.

Example

csharp
using static Stove.PCSDK.IAP;

void OnFetchVoidedPurchasesExFinished(CallbackResult callbackResult, StovePCVoidedPurchasesEx[] voidedPurchase)
{
    if (!callbackResult.result.IsSuccessful())
    {
        return;
    }

    foreach (var voided in voidedPurchase)
    {
        // Please implement the logic for recovering canceled payments using variables such as `voided.marketTid` and `voided.voidedDt`.
    }
}

Notes

See Also


StovePCVoidedPurchasesMarketType

Kind Enum · Module IAP · Version 3.4.1 · Deprecated

Description

This type is not currently supported by the SDK. IAP_FetchVoidedPurchasesEx(), which used this value, is also no longer supported. The refund inquiry feature itself has been deprecated.

Pass this to the marketType parameter of IAP_FetchVoidedPurchasesEx to specify which marketplace's purchase cancellation records to retrieve.

Declaration

csharp
public enum StovePCVoidedPurchasesMarketType
{
    ALL = 0,
    STEAM = 1,
    GOOGLE_PLAY = 2,
    APPLE_APP_STORE = 3
}

Enum Values

CodeNameDescription
0ALLView cancellation history for all markets
1STEAMThis feature only displays the cancellation history on the Steam Marketplace.
2GOOGLE_PLAYThis feature only displays the cancellation history from the Google Play Store.
3APPLE_APP_STOREThis feature only retrieves cancellation history from the Apple App Store.

Example

csharp
using static Stove.PCSDK.IAP;

IAP_FetchVoidedPurchasesEx(StovePCVoidedPurchasesMarketType.STEAM, OnFetchVoidedPurchasesExFinished);

Notes

  • Prior to version 3.4.1, IAP_FetchVoidedPurchases only retrieves the entire transaction history without distinguishing between markets.

See Also


View_AutoPopup

Kind Function · Module View · Version 3.0.0.4

Description

AutoPopup is launched using WebView. The WebView is displayed using the method specified as mode (external browser or internal style).

It must be initialized to View_Initialize or View_InitializeWithWndInfo before the call.

Declaration

csharp
public static void View_AutoPopup(WebViewMode mode, OnPopupFinished onFinished);

Parameters

NameTypeRequiredDescription
modeWebViewModeYThis is the mode in which WebView runs.
onFinishedOnPopupFinishedYThis is a callback function that receives the results of the WebView execution.

Returns

None

Callback

csharp
public delegate void OnPopupFinished(CallbackResult result);
NameTypeDescription
resultCallbackResultThis is the callback result.

onFinished is passed once when the WebView execution results are returned. The callback runs on the thread that called Base_RunCallback().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe pop-up feature has not been initialized. You must first call View_Initialize.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView to display the pop-upx
82WEBVIEW_CREATE_FAILFailed to create a pop-up WebViewx
83WEBVIEW_LOAD_URL_FAILUnable to load the page in the pop-up WebViewx
84WEBVIEW_CLOSE_ALL_FAILFailed to close all previously open pop-ups before creating a new onex
87NO_POPUP_DATAThere is no pop-up configuration information to display.OThere is no pop-up configuration information, so there is no window to display. [OK]
253UNMANAGED_EXCEPTIONAn exception occurred within the native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred inside the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For a complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;
using static Stove.PCSDK.Base;

void OnAutoPopupFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

View_AutoPopup(WebViewMode.INTERNAL, OnAutoPopupFinished);

Notes

See Also


View_AutoPopupEx

Kind Function · Module View · Version 3.3.4

Description

Launch AutoPopup using WebView. It works the same as View_AutoPopup, but you can also receive the onDestroy callback, which is triggered when the popup's native resources have been completely released.

It must be initialized to View_Initialize or View_InitializeWithWndInfo before it is called.

Declaration

csharp
public static void View_AutoPopupEx(WebViewMode mode, OnPopupFinished onFinished, OnViewPopupDestroyFinished onDestroy);

Parameters

NameTypeRequiredDescription
modeWebViewModeYThis is the mode in which WebView runs.
onFinishedOnPopupFinishedYThis is a callback function that receives the results of running WebView.
onDestroyOnViewPopupDestroyFinishedNThis is the callback function that is called when the pop-up is closed.

Returns

None

Callback

csharp
public delegate void OnPopupFinished(CallbackResult result);
public delegate void OnViewPopupDestroyFinished(CallbackResult result);
NameTypeDescription
resultCallbackResultThis is the callback result.

onFinished is called once when the WebView execution results are returned. onDestroy is called once when the popup's native resources have been completely released. Both callbacks are executed on the thread that called Base_RunCallback().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe pop-up feature has not been initialized. You must call View_Initialize first.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView to display the pop-upx
82WEBVIEW_CREATE_FAILFailed to create a pop-up WebViewx
83WEBVIEW_LOAD_URL_FAILUnable to load the page in the pop-up WebViewx
84WEBVIEW_CLOSE_ALL_FAILFailed to close all pop-ups that were already open before creating a new pop-upx
85WEBVIEW_CLOSE_FAILFailed to close the pop-up (passed to the onDestroy callback)x
87NO_POPUP_DATAThere is no pop-up configuration information to display.OThere is no pop-up configuration information, so there is no window to display. [OK]
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;
using static Stove.PCSDK.Base;

void OnAutoPopupFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

void OnAutoPopupDestroyed(CallbackResult callbackResult)
{
    // Please implement the logic after the pop-up resources have been released.
}

View_AutoPopupEx(WebViewMode.INTERNAL, OnAutoPopupFinished, OnAutoPopupDestroyed);

Notes

  • Unlike View_AutoPopup, it also receives the onDestroy callback, which is notified when the popup is destroyed.
  • To close all pop-ups displayed on the screen at once, use View_CloseAllPopups.

See Also


View_CloseAllPopups

Kind Function · Module View · Version 3.1.3

Description

Closes all pop-ups opened using the pop-up feature.

Declaration

csharp
public static Result View_CloseAllPopups();

Parameters

None

Returns

TypeDescription
ResultHere are the results of the function call. Check result.IsSuccessful() to see if it was successful.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe pop-up feature is not initializedx
80VIEWUI_NOT_INITIALIZEDThe WebView of the popup to be closed has not been initializedx
84WEBVIEW_CLOSE_ALL_FAILFailed to close all open pop-upsx
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred inside the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OA temporary problem has occurred. Please try again. [OK]

For the complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;

Result result = View_CloseAllPopups();
if (result.IsSuccessful())
{
    // Please implement the logic for when the operation is successful.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

See Also


View_CouponPopup

Kind Function · Module View · Version 3.0.0.4

Description

Launch CouponPopup using WebView.

It must be initialized to View_Initialize or View_InitializeWithWndInfo before being called.

Declaration

csharp
public static void View_CouponPopup(WebViewMode mode, OnPopupFinished onFinished);

Parameters

NameTypeRequiredDescription
modeWebViewModeYThis is the mode for running WebView.
onFinishedOnPopupFinishedYThis is a callback function that receives the results of the WebView execution.

Returns

None

Callback

csharp
public delegate void OnPopupFinished(CallbackResult result);
NameTypeDescription
resultCallbackResultThis is the callback result.

onFinished is passed once when the WebView execution results are returned. The callback runs on the thread that called Base_RunCallback().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMThe game server world connection information (worldId) is empty (not connected to the world).x
17NOT_INITIALIZEDThe pop-up feature has not been initialized. You must call View_Initialize first.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView that displays the pop-upx
82WEBVIEW_CREATE_FAILFailed to create a pop-up WebViewx
83WEBVIEW_LOAD_URL_FAILUnable to load the page in the pop-up web viewx
84WEBVIEW_CLOSE_ALL_FAILFailed to close all previously open pop-ups before creating a new onex
87NO_POPUP_DATAThere is no pop-up configuration information to display.OThere is no pop-up configuration information, so there is no window to display. [OK]
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred inside the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary problem has occurred. Please try again. [OK]

For a complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;
using static Stove.PCSDK.Base;

void OnCouponPopupFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

View_CouponPopup(WebViewMode.INTERNAL, OnCouponPopupFinished);

Notes

See Also


View_CouponPopupEx

Kind Function · Module View · Version 3.3.4

Description

Launch CouponPopup using WebView. This works the same as View_CouponPopup, but you can also receive the onDestroy callback, which is triggered when the popup's native resources have been completely released.

It must be initialized to View_Initialize or View_InitializeWithWndInfo before being called.

Declaration

csharp
public static void View_CouponPopupEx(WebViewMode mode, OnPopupFinished onFinished, OnViewPopupDestroyFinished onDestroy);

Parameters

NameTypeRequiredDescription
modeWebViewModeYThis is the mode in which WebView runs.
onFinishedOnPopupFinishedYThis is a callback function that receives the results of running WebView.
onDestroyOnViewPopupDestroyFinishedNThis is the callback function that is called when the popup is closed.

Returns

None

Callback

csharp
public delegate void OnPopupFinished(CallbackResult result);
public delegate void OnViewPopupDestroyFinished(CallbackResult result);
NameTypeDescription
resultCallbackResultThis is the callback result.

onFinished is called once when the WebView execution results are available. onDestroy is called once when the popup's native resources have been fully released. Both callbacks are executed on the thread that called Base_RunCallback().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMThe game server world connection information (worldId) is empty (not connected to the world)x
17NOT_INITIALIZEDThe pop-up feature has not been initialized. You must call View_Initialize first.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView to display the pop-upx
82WEBVIEW_CREATE_FAILFailed to create a pop-up WebViewx
83WEBVIEW_LOAD_URL_FAILUnable to load the page in the pop-up WebViewx
84WEBVIEW_CLOSE_ALL_FAILFailed to close all previously open pop-ups before creating a new onex
85WEBVIEW_CLOSE_FAILFailed to close the popup (passed to the onDestroy callback)x
87NO_POPUP_DATAThere is no pop-up configuration information to display.OThere is no pop-up configuration information, so there is no window to display. [OK]
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary problem has occurred. Please try again. [OK]

For the complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;
using static Stove.PCSDK.Base;

void OnCouponPopupFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

void OnCouponPopupDestroyed(CallbackResult callbackResult)
{
    // Please implement the logic after the pop-up resources have been released.
}

View_CouponPopupEx(WebViewMode.INTERNAL, OnCouponPopupFinished, OnCouponPopupDestroyed);

Notes

  • Unlike View_CouponPopup, it also receives the onDestroy callback, which is triggered when the popup is destroyed.
  • To close all pop-ups displayed on the screen at once, use View_CloseAllPopups.

See Also


View_FetchWebOpenKey

Kind Function · Module View · Version 3.3.0 · Deprecated

Description

This feature is deprecated. It is not available in the new interface either.

Obtain a one-time key to use the "Web Open in Game" feature. Use this only when you need to display the Stove Community or Customer Support via an external browser.

It must be initialized to View_Initialize or View_InitializeWithWndInfo before the call.

Declaration

csharp
public static void View_FetchWebOpenKey(OnFetchWebOpenKeyFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnFetchWebOpenKeyFinishedYThis is a callback function that receives the results of the FetchWebOpenKey execution.

Returns

None

Callback

csharp
public delegate void OnFetchWebOpenKeyFinished(CallbackResult result, string key);
NameTypeDescription
resultCallbackResultThis is the callback result.
keystringThis is a one-time key that has been issued.

onFinished is dispatched once when the key issuance result is available. The callback runs on the thread that called Base_RunCallback().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe pop-up feature has not been initialized. You must call View_Initialize first.x
25RESPONSE_VALUE_IS_NULLThe server response data is emptyOThe network connection is unstable. Please check your network status and try again. [OK]
26RESPONSE_INVALID_VALUE_FORMATThe server response data format is invalid.OThe network connection is unstable. Please check your network status and try again. [OK]
249NETWORK_TRANSPORT_ERRORAn error occurred at the network transport layerx
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary problem has occurred. Please try again. [OK]

For the complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;
using static Stove.PCSDK.Base;

void OnFetchWebOpenKeyFinished(CallbackResult callbackResult, string key)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic to open the Stove Community, Customer Support, and other pages in an external browser using the key.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

View_FetchWebOpenKey(OnFetchWebOpenKeyFinished);

Notes

  • Use this only when you need to display the Stove Community or Customer Support page in an external browser.

See Also


View_GetVersion

Kind Function · Module View · Version 3.4.1

Description

Retrieves version information for the pop-up feature.

Declaration

csharp
public static Result View_GetVersion(ref string version, uint length);

Parameters

NameTypeRequiredDescription
versionref stringYThis is the variable that will hold the version string. Any value it contains before the call is ignored and replaced with the resulting string after the call.
lengthuintYThis is the length of the string buffer used internally.

Returns

TypeDescription
ResultHere are the results of the function call. Check whether it was successful by looking at result.IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMversion No buffer, length is 0, or the buffer size is insufficient to hold the stringx
251PCSDK_DLL_NOT_FOUNDFailed to check the version because the SDK file path could not be found.x
253UNMANAGED_EXCEPTIONAn exception occurred within the native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

This function actually returns the BaseSDK integrated version as-is, rather than the ViewSDK version itself. For a complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;

string version = null;
Result result = View_GetVersion(ref version, 64);
if (result.IsSuccessful())
{
    // Please implement the logic for when the operation succeeds. Use the `version` parameter.
}
else
{
    // Please implement the logic for when a failure occurs.
}

Notes

  • This function is synchronous and does not accept callbacks.

See Also


View_Initialize

Kind Function · Module View · Version 3.0.0.4

Description

Resets the pop-up functionality. Use this when the parent window handle for the Internal Style pop-up is not required. If you need to specify a parent window handle, use View_InitializeWithWndInfo.

You must call this function first before calling any other functions provided by the popup feature.

Declaration

csharp
public static Result View_Initialize();

Parameters

None

Returns

TypeDescription
ResultHere are the results of the function call. Check result.IsSuccessful() to see if it was successful.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
16BASE_NOT_INITIALIZEDBaseSDK was not initialized. You must call Base_Initialize first.x
18ALREADY_INITIALIZEDThe pop-up feature is already initialized.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView to display the popupx
251PCSDK_DLL_NOT_FOUNDFailed to verify the version because the SDK file path could not be found.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred inside the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For a complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;

Result result = View_Initialize();
if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • This function is synchronous and does not accept callbacks.
  • Use View_InitializeWithWndInfo to specify the parent window handle for the Internal Style pop-up.
  • When you are finished using it, release the resource to View_UnInitialize.

See Also


View_InitializeWithWndInfo

Kind Function · Module View · Version 3.3.3

Description

Resets the pop-up functionality. Use this when you need the handle to the main window that will serve as the parent window for the Internal Style pop-up.

You must call this function first before calling any other functions provided by the pop-up feature.

Declaration

csharp
public static Result View_InitializeWithWndInfo(IntPtr mainWndHandle);

Parameters

NameTypeRequiredDescription
mainWndHandleIntPtrYThis is the handle (HWND) of the main window that will serve as the parent window for the Internal Style pop-up.

Returns

TypeDescription
ResultHere are the results of the function call. Check whether it was successful by looking at result.IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
16BASE_NOT_INITIALIZEDBaseSDK has not been initialized. You must call Base_Initialize first.x
18ALREADY_INITIALIZEDThe pop-up feature is already initialized.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView to display the pop-upx
251PCSDK_DLL_NOT_FOUNDFailed to verify the version because the SDK file path could not be found.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;

Result result = View_InitializeWithWndInfo(mainWndHandle);
if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • This function is synchronous and does not accept callbacks.
  • If you do not need the parent window handle for the Internal Style pop-up, use View_Initialize.
  • When you are finished using it, release the resource to View_UnInitialize.

See Also


View_ManualPopup

Kind Function · Module View · Version 3.0.0.4

Description

Use WebView to launch the ManualPopup specified as resourceKey.

It must be initialized to View_Initialize or View_InitializeWithWndInfo before the call.

Declaration

csharp
public static void View_ManualPopup(string resourceKey, WebViewMode mode, OnPopupFinished onFinished);

Parameters

NameTypeRequiredDescription
resourceKeystringYThis is the ResourceKey for Manual Popup.
modeWebViewModeYThis is the mode in which WebView runs.
onFinishedOnPopupFinishedYThis is a callback function that receives the results of executing WebView.

Returns

None

Callback

csharp
public delegate void OnPopupFinished(CallbackResult result);
NameTypeDescription
resultCallbackResultThis is the callback result.

onFinished is passed once when the WebView execution results are returned. The callback runs on the thread that called Base_RunCallback().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMresourceKey is an empty stringx
17NOT_INITIALIZEDThe popup feature has not been initialized. You must call View_Initialize first.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView to display the pop-upx
82WEBVIEW_CREATE_FAILFailed to create a pop-up WebViewx
83WEBVIEW_LOAD_URL_FAILUnable to load the page in the pop-up WebViewx
84WEBVIEW_CLOSE_ALL_FAILFailed to close all previously open pop-ups before creating a new onex
87NO_POPUP_DATAThere is no pop-up configuration information to display.OThere is no pop-up configuration information, so there is no window to display. [OK]
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For a complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;
using static Stove.PCSDK.Base;

void OnManualPopupFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

View_ManualPopup("YOUR_RESOURCE_KEY", WebViewMode.INTERNAL, OnManualPopupFinished);

Notes

See Also


View_ManualPopupEx

Kind Function · Module View · Version 3.3.4

Description

Use WebView to launch the ManualPopup specified as resourceKey. It functions the same as View_ManualPopup, but you can also receive the onDestroy callback, which is triggered when the popup's native resources have been completely released.

It must be initialized to View_Initialize or View_InitializeWithWndInfo before the call.

Declaration

csharp
public static void View_ManualPopupEx(string resourceKey, WebViewMode mode, OnPopupFinished onFinished, OnViewPopupDestroyFinished onDestroy);

Parameters

NameTypeRequiredDescription
resourceKeystringYThis is the ResourceKey for Manual Popup.
modeWebViewModeYThis is the mode in which WebView runs.
onFinishedOnPopupFinishedYThis is a callback function that receives the results of the WebView execution.
onDestroyOnViewPopupDestroyFinishedNThis is the callback function that is called when the pop-up is closed.

Returns

None

Callback

csharp
public delegate void OnPopupFinished(CallbackResult result);
public delegate void OnViewPopupDestroyFinished(CallbackResult result);
NameTypeDescription
resultCallbackResultThis is the callback result.

onFinished is called once when the WebView execution results are returned. onDestroy is called once when the popup’s native resources have been fully released. Both callbacks are executed on the thread that called Base_RunCallback().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMresourceKey is an empty stringx
17NOT_INITIALIZEDThe pop-up feature has not been initialized. You must call View_Initialize first.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView to display the popupx
82WEBVIEW_CREATE_FAILFailed to create a pop-up WebViewx
83WEBVIEW_LOAD_URL_FAILUnable to load the page in the pop-up WebViewx
84WEBVIEW_CLOSE_ALL_FAILFailed to close all previously open pop-ups before creating a new onex
85WEBVIEW_CLOSE_FAILFailed to close the popup (passed to the onDestroy callback)x
87NO_POPUP_DATAThere is no pop-up configuration information to display.OThere is no pop-up configuration information, so there is no window to display. [OK]
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;
using static Stove.PCSDK.Base;

void OnManualPopupFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

void OnManualPopupDestroyed(CallbackResult callbackResult)
{
    // Please implement the logic after the pop-up resources have been released.
}

View_ManualPopupEx("YOUR_RESOURCE_KEY", WebViewMode.INTERNAL, OnManualPopupFinished, OnManualPopupDestroyed);

Notes

  • Unlike View_ManualPopup, it also receives a onDestroy callback that is triggered when the popup is destroyed.
  • To close all pop-ups displayed on the screen at once, use View_CloseAllPopups.

See Also


View_NewsPopup

Kind Function · Module View · Version 3.0.0.4

Description

Launch NewsPopup using WebView.

It must be initialized to View_Initialize or View_InitializeWithWndInfo before being called.

Declaration

csharp
public static void View_NewsPopup(WebViewMode mode, OnPopupFinished onFinished);

Parameters

NameTypeRequiredDescription
modeWebViewModeYThis is the mode in which WebView runs.
onFinishedOnPopupFinishedYThis is a callback function that receives the results of running WebView.

Returns

None

Callback

csharp
public delegate void OnPopupFinished(CallbackResult result);
NameTypeDescription
resultCallbackResultThis is the callback result.

onFinished is passed once when the WebView execution results are returned. The callback runs on the thread that called Base_RunCallback().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe pop-up feature has not been initialized. You must call View_Initialize first.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView to display the pop-upx
82WEBVIEW_CREATE_FAILFailed to create a pop-up WebViewx
83WEBVIEW_LOAD_URL_FAILUnable to load the page in the pop-up WebViewx
84WEBVIEW_CLOSE_ALL_FAILFailed to close all previously open pop-ups before creating a new onex
87NO_POPUP_DATAThere is no pop-up configuration information to display.OThere is no pop-up configuration information, so there is no window to display. [OK]
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOThere was a temporary issue. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;
using static Stove.PCSDK.Base;

void OnNewsPopupFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

View_NewsPopup(WebViewMode.INTERNAL, OnNewsPopupFinished);

Notes

See Also


View_NewsPopupEx

Kind Function · Module View · Version 3.3.4

Description

Launch NewsPopup using WebView. It works the same as View_NewsPopup, but you can also receive the onDestroy callback, which is triggered when the popup's native resources have been completely released.

It must be initialized to View_Initialize or View_InitializeWithWndInfo before the call.

Declaration

csharp
public static void View_NewsPopupEx(WebViewMode mode, OnPopupFinished onFinished, OnViewPopupDestroyFinished onDestroy);

Parameters

NameTypeRequiredDescription
modeWebViewModeYThis is the mode in which WebView runs.
onFinishedOnPopupFinishedYThis is a callback function that receives the results of executing WebView.
onDestroyOnViewPopupDestroyFinishedNThis is the callback function that is called when the pop-up is closed.

Returns

None

Callback

csharp
public delegate void OnPopupFinished(CallbackResult result);
public delegate void OnViewPopupDestroyFinished(CallbackResult result);
NameTypeDescription
resultCallbackResultThis is the callback result.

onFinished is called once when the WebView execution results are returned. onDestroy is called once when the popup's native resources have been completely released. Both callbacks are executed on the thread that called Base_RunCallback().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe pop-up feature has not been initialized. You must call View_Initialize first.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView to display the pop-upx
82WEBVIEW_CREATE_FAILFailed to create a pop-up WebViewx
83WEBVIEW_LOAD_URL_FAILUnable to load the page in the pop-up WebViewx
84WEBVIEW_CLOSE_ALL_FAILFailed to close all previously open pop-ups before creating a new onex
85WEBVIEW_CLOSE_FAILFailed to close the popup (passed to the onDestroy callback)x
87NO_POPUP_DATAThere is no pop-up configuration information to display.OThere is no pop-up configuration information, so there is no window to display. [OK]
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;
using static Stove.PCSDK.Base;

void OnNewsPopupFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

void OnNewsPopupDestroyed(CallbackResult callbackResult)
{
    // Please implement the logic after the pop-up resources have been released.
}

View_NewsPopupEx(WebViewMode.INTERNAL, OnNewsPopupFinished, OnNewsPopupDestroyed);

Notes

  • Unlike View_NewsPopup, it also receives a callback onDestroy that is notified when the popup is destroyed.
  • To close all pop-ups displayed on the screen at once, use View_CloseAllPopups.

See Also


View_SetPopupDisallowed

Kind Function · Module View · Version 3.0.0.4

Description

Suppresses the display of the pop-up identifier specified in popupDisallowed for the specified number of days (days).

It must be initialized to View_Initialize or View_InitializeWithWndInfo before the call.

Declaration

csharp
public static void View_SetPopupDisallowed(StovePCPopupDisallowed popupDisallowed, OnSetPopupDisallowedFinished onFinished);

Parameters

NameTypeRequiredDescription
popupDisallowedStovePCPopupDisallowedYThis is the information required when pop-ups are not displayed (pop-up identifier, suppression period).
onFinishedOnSetPopupDisallowedFinishedYThis is a callback function that receives the results of the PopupDisallowed execution.

Returns

None

Callback

csharp
public delegate void OnSetPopupDisallowedFinished(CallbackResult result);
NameTypeDescription
resultCallbackResultThis is the callback result.

onFinished is called once when the processing results are available. The callback runs on the thread that called Base_RunCallback().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
1FAILFailed to save pop-up display limit information locallyx
17NOT_INITIALIZEDThe popup feature has not been initialized. You must call View_Initialize first.x
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOThere was a temporary issue. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For a complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;
using static Stove.PCSDK.Base;

void OnSetPopupDisallowedFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

var popupDisallowed = new StovePCPopupDisallowed
{
    popupId = 1001,
    days = 7,
};

View_SetPopupDisallowed(popupDisallowed, OnSetPopupDisallowedFinished);

Notes

  • This function is not an API that closes the pop-up; rather, it is an API that suppresses the pop-up from reappearing for a specified period of time.
  • To immediately close the pop-up displayed on the screen, use View_CloseAllPopups.

See Also


View_UnInitialize

Kind Function · Module View · Version 3.0.0.4

Description

Releases resources associated with the pop-up feature. This function pairs with View_Initialize or View_InitializeWithWndInfo.

Declaration

csharp
public static Result View_UnInitialize();

Parameters

None

Returns

TypeDescription
ResultHere are the results of the function call. Check result.IsSuccessful() to determine whether it was successful.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe pop-up feature is not initialized.x
81VIEWUI_UNINIT_FAILEDFailed to close the pop-up WebViewx
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check Result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;

Result result = View_UnInitialize();
if (result.IsSuccessful())
{
    // Please implement the logic for the success case.
}
else
{
    // Please implement the logic for when a failure occurs.
}

Notes

See Also


View_VerifyIdentificationPopup

Kind Function · Module View · Version 3.3.4

Description

Use WebView to launch the identity verification pop-up. Specify whether to use SDI for verification with compareIdentifier; if set to false, onDestroy is provided instead of simKey.

It must be initialized to View_Initialize or View_InitializeWithWndInfo before the call.

Starting with version 3.4.1, this feature has been restricted to use in Korea.

Declaration

csharp
public static void View_VerifyIdentificationPopup(bool compareIdentifier, WebViewMode mode,
                                                    OnPopupFinished onFinished, OnVerifyIdentificationPopupDestroyFinished onDestroy);

Parameters

NameTypeRequiredDescription
compareIdentifierboolYThis refers to whether verification is performed using SDI. If false, simKey is provided.
modeWebViewModeYThis is the mode in which WebView runs.
onFinishedOnPopupFinishedYThis is a callback function that receives the results of the WebView execution.
onDestroyOnVerifyIdentificationPopupDestroyFinishedYThis is the callback function that is called when the pop-up is closed.

Returns

None

Callback

csharp
public delegate void OnPopupFinished(CallbackResult result);
public delegate void OnVerifyIdentificationPopupDestroyFinished(CallbackResult result, string simKey);
NameTypeDescription
resultCallbackResultThis is the callback result.
simKeystringThis is the SIM key issued upon successful authentication.

onFinished is sent once when the WebView execution results are returned. onDestroy is triggered once when the identity verification pop-up closes, and if verification is successful, simKey is triggered as well. Both callbacks are executed on the thread that called Base_RunCallback().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe popup feature has not been initialized. You must call View_Initialize first.x
31NOT_SUPPORTED_COUNTRYThis feature is not supported when the call is made from outside South Korea.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the WebView to display the pop-upx
82WEBVIEW_CREATE_FAILFailed to create a pop-up WebViewx
83WEBVIEW_LOAD_URL_FAILUnable to load the page in the pop-up WebViewx
84WEBVIEW_CLOSE_ALL_FAILFailed to close all previously open pop-ups before creating a new onex
85WEBVIEW_CLOSE_FAILFailed to close the pop-up (passed to the onDestroy callback)x
87NO_POPUP_DATAThere is no pop-up configuration information to display.OThere is no pop-up configuration information, so there is no window to display. [OK]
253UNMANAGED_EXCEPTIONAn exception occurred within the Native SDKOA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the C# wrapper (e.g., marshaling). Please check CallbackResult.result.exceptionMessage.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see ViewSDKResultCode.

Example

csharp
using static Stove.PCSDK.View;
using static Stove.PCSDK.Base;

void OnVerifyIdentificationPopupFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

void OnVerifyIdentificationPopupDestroyed(CallbackResult callbackResult, string simKey)
{
    if (!string.IsNullOrEmpty(simKey))
    {
        // Please use simKey wherever needed.
    }
}

View_VerifyIdentificationPopup(false, WebViewMode.INTERNAL,
                                OnVerifyIdentificationPopupFinished, OnVerifyIdentificationPopupDestroyed);

Notes

  • Unlike other popup APIs, the onDestroy callback type is OnVerifyIdentificationPopupDestroyFinished and passes an additional simKey argument.
  • If onFinished is null, then compareIdentifier is automatically converted to false, triggering the internal function.
  • To close all pop-ups displayed on the screen at once, use View_CloseAllPopups.

Changelog

VersionChange
3.3.4First Published
3.4.1Limited to features available only in Korea

See Also


ViewSDKMethod

Kind Enum · Module View · Version 3.0.0.4

Description

This value, retrieved as Result.methodCode, identifies which method of the pop-up feature generated this result.

Declaration

csharp
public enum ViewSDKMethod
{
    INITIALIZE = 1,
    UNINITIALIZE = 2,
    // ... See the "Values" table below
    FETCH_WEB_OPEN_KEY = 162,
};

Enum Values

CodeNameDescription
1INITIALIZEView_Initialize / View_InitializeWithWndInfo
2UNINITIALIZEView_UnInitialize
5GET_VERSIONView_GetVersion
6 ~ 79Not in use (reserved section)
80FETCH_AUTOJudging by the name, this appears to be an internal step for fetching AutoPopup content; no separate public API is provided.
81AUTO_POPUPView_AutoPopup / View_AutoPopupEx
82FETCH_MANUALJudging by the name, this appears to be an internal step for fetching ManualPopup content; no separate public API is provided.
83MANUAL_POPUPView_ManualPopup / View_ManualPopupEx
84FETCH_NEWSJudging by the name, this appears to be an internal step for fetching NewsPopup content; no separate public API is provided.
85NEWS_POPUPView_NewsPopup / View_NewsPopupEx
86FETCH_COUPONJudging by the name, this appears to be an internal step for fetching CouponPopup content; no separate public API is provided.
87COUPON_POPUPView_CouponPopup / View_CouponPopupEx
88FETCH_COMMUNITYJudging by the name, this appears to be an internal step for fetching community content; no separate public API is provided.
89COMMUNITY_POPUPBased on the name, it appears to be designed to handle community pop-ups, and no separate public API is provided.
90FETCH_VERIFY_IDENTIFICATIONBased on the name, this appears to be an internal process for retrieving (fetching) identity verification content; no separate public API is provided.
91VERIFY_IDENTIFICATION_POPUPView_VerifyIdentificationPopup
92FETCH_CSBased on the name, this appears to be an internal process for retrieving (fetching) customer service content; no separate public API is provided.
93CS_POPUPBased on the name, it appears to handle customer service pop-ups, and no separate public API is provided.
94 ~ 159Not in use (reserved section)
160SET_POPUP_DISALLOWEDView_SetPopupDisallowed
161CLOSE_ALL_POPUPSView_CloseAllPopups
162FETCH_WEB_OPEN_KEYView_FetchWebOpenKey

Values (3, 4) that contain INTERNAL in their names are excluded from the table. Values intended for internal use only are not included in the document.

Example

csharp
using static Stove.PCSDK.View;

Result result = View_Initialize();

if (result.methodCode == (uint)ViewSDKMethod.INITIALIZE)
{
    // Please implement logic to verify that this result was generated by a call to `View_Initialize()`.
}

Notes

  • Even for the same pop-up, the values differ between the new interface and the old one. The new interface (such as Stove_AutoPopup) returns values from the 1000 series of EStoveViewMethodCode. The old interface retains the values listed in this document. While using both versions simultaneously, please separate the log aggregation criteria by version.
  • There are no corresponding public APIs for the values FETCH_*, COMMUNITY_POPUP, and CS_POPUP.
  • Since Result.methodCode is of type uint, it is cast to (uint)ViewSDKMethod.... when compared with this enumeration value.

See Also


ViewSDKResultCode

Kind Result Code · Module View · Version 3.0.0.4

Description

This is the value returned by the query Result.resultCode / CallbackResult.result.resultCode. A value of 0 (SUCCESS) indicates success.

Declaration

csharp
public enum ViewSDKResultCode
{
    SUCCESS = 0,
    FAIL = 1,
    // ... See the "Values" table below
    NO_POPUP_DATA = 87,
}

Enum Values

General Results

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
1FAILGeneral failure. Check log/errorMessage for detailed causes.x

Configuration/Parameter Validation Failed

CodeNameDescriptionShow to UserIn-Game Message
2INVALID_CONFIGThe setting is invalid. Please check the setting.x
3INVALID_LOG_LEVELThe log level value is invalid. Please verify the log level value.x
4INVALID_LOG_PATHThe log path is invalid. Please verify the log path.x
5INVALID_PARAMThe parameter is invalid. Please check the parameter value in the calling code and correct it.x
6 ~ 15Not in use (reserved section)

Initialization Error

CodeNameDescriptionShow to UserIn-Game Message
16BASE_NOT_INITIALIZEDThe SDK has not been initialized. Call Base_Initialize() first.x
17NOT_INITIALIZEDThe pop-up feature is not initialized. Call View_Initialize first.x
18ALREADY_INITIALIZEDIt has already been initialized. Remove the duplicate initialization call.x

Token/Entity Error

CodeNameDescriptionShow to UserIn-Game Message
19INVALID_ACCESS_TOKENThe AccessToken is invalid. Please reissue the token.OYour login session has expired. Please close the game and restart it. [OK]
20NULL_TOKEN_ENTITYThe token entity is null. Check the token issuance status.x
21NULL_ENTITYThe entity is null. Check whether the response object is null.x

HTTP/Response Errors

CodeNameDescriptionShow to UserIn-Game Message
22HTTP_ERRORAn HTTP error has occurred. Please check your network connection and try again.OThe network connection is unstable. Please check your network status and try again. [OK]
23RESPONSE_ERRORThis is a server response error. Please check the server response.OThe network connection is unstable. Please check your network status and try again. [OK]
24RESPONSE_INVALID_CODEThe server response code is invalid. Please check the server response code.OThe network connection is unstable. Please check your network status and try again. [OK]
25RESPONSE_VALUE_IS_NULLThe server response value is null. Please check the server response value.OThe network connection is unstable. Please check your network connection and try again. [OK]
26RESPONSE_INVALID_VALUE_FORMATThe server response format is invalid. Please verify the server response format.OThe network connection is unstable. Please check your network status and try again. [OK]
CodeNameDescriptionShow to UserIn-Game Message
27LOG_81PLUG_ERRORAn error occurred while processing 81Plug logs. Please check the log and network status.x
28UPDATE_81PLUG_FEED_ERRORAn error occurred while updating the 81Plug feed. Please check the logs and network status.x

Other Status

CodeNameDescriptionShow to UserIn-Game Message
29ASYNC_OPERATION_IN_PROGRESSAn asynchronous operation is already in progress. Please call again after the current asynchronous operation has completed.x
30BASE_UNINITIALIZEDThe SDK has already been uninitialized. Please call Base_Initialize() again.x
31NOT_SUPPORTED_COUNTRYThis country/region is not supported. Please check the country/region restrictions and stop the call.x
32 ~ 79Not in use (reserved section)

Error specific to pop-ups

CodeNameDescriptionShow to UserIn-Game Message
80VIEWUI_NOT_INITIALIZEDThe View UI has not been initialized. Check the preceding calls: View_Initialize / View_InitializeWithWndInfox
81VIEWUI_UNINIT_FAILEDFailed to uninitialize the View UI (UnInit)x
82WEBVIEW_CREATE_FAILFailed to create a WebViewx
83WEBVIEW_LOAD_URL_FAILFailed to load the URL in the WebViewx
84WEBVIEW_CLOSE_ALL_FAILFailed to close the entire WebViewx
85WEBVIEW_CLOSE_FAILFailed to close the WebViewx
86WEBVIEW_CREATE_COOKIE_FAILFailed to create a WebView cookieOThe page cannot be loaded. Please try again. [OK]
87NO_POPUP_DATAThere is no pop-up data to display.OThere is no pop-up configuration information, so there is no window to display. [OK]
88 ~ 250Not in use (reserved section)

System/Runtime Failure

CodeNameDescriptionShow to UserIn-Game Message
251PCSDK_DLL_NOT_FOUNDThe PCSDK DLL cannot be found. Check the location of the PCSDK DLL.x
252NOT_IMPLEMENTEDThis feature has not been implemented. Please remove the call or check for an alternative API.x
253UNMANAGED_EXCEPTIONAn unmanaged exception has occurred. Check the exception log.OThere was a temporary issue. Please try again. [OK]
254MANAGED_EXCEPTIONA managed exception has occurred. Check the exception log.OThere was a temporary issue. Please try again. [OK]
255UNKNOWN_ERRORAn unknown error has occurred. Check the detailed log.x

If you receive the code below, you must exit the game. The game cannot proceed normally.

  • 19 INVALID_ACCESS_TOKEN — Your login session has expired; you must exit the game and restart it.

Example

csharp
using static Stove.PCSDK.View;
using static Stove.PCSDK.Base;

void OnAutoPopupFinished(CallbackResult callbackResult)
{
    if (callbackResult.result.IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else if (callbackResult.result.resultCode == (uint)ViewSDKResultCode.NO_POPUP_DATA)
    {
        // Please implement the logic for when there is no pop-up data to display.
    }
    else
    {
        // Please implement the logic for other failure scenarios.
    }
}

Notes

  • The ranges 0–31 and 251–255 have the same values and meanings as *SDKResultCode in other modules.
  • Since resultCode is of type uint, a type cast is required when comparing it to this enumeration value.

See Also


WebViewMode

Kind Enum · Module Base · Version 3.0.0.4

Description

Based on the value names (EXTERNAL, INTERNAL), WebViewMode is presumed to be a value that determines whether the WebView opens in an external browser or in the SDK's internal view.

Declaration

csharp
public enum WebViewMode
{
    EXTERNAL,
    INTERNAL
};

Enum Values

CodeNameDescription
0EXTERNALOpens the WebView using an external method
1INTERNALOpens the WebView internally

Example

csharp
using static Stove.PCSDK.Base;

WebViewMode mode = WebViewMode.EXTERNAL;

Notes

  • None

See Also

  • None