Skip to content
Stove
Last Updated

PC SDK Native Reference — 3.4.x and Earlier

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

Contents

NameKindModule
Base_AccessTokenRenewedFunctionBase
Base_GetAccessTokenFunctionBase
Base_GetGdsFunctionBase
Base_GetOverImmersionFunctionBase
Base_GetRenewTokenFunctionBase
Base_GetShutdownFunctionBase
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
CallbackResultStructBase
CloseButtonTypeEnumView
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
Log_GetVersionFunctionLog
Log_InitializeFunctionLog
Log_SendFunctionLog
Log_UnInitializeFunctionLog
PCBang_CheckPCBangStatusFunctionPCBang
PCBang_GetVersionFunctionPCBang
PCBang_InitializeFunctionPCBang
PCBang_UnInitializeFunctionPCBang
PCBang_UserLoginFunctionPCBang
PCBang_UserLogoutFunctionPCBang
PCBangPremiumEnumPCBang
ProductTypeCodeEnumIAP
PurchaseLimitTypeCodeEnumIAP
PurchaseProgressEnumIAP
ResultStructBase
SDKMethod (Base)EnumBase
SDKMethod (IAP)EnumIAP
SDKMethod (Log)EnumLog
SDKMethod (PCBang)EnumPCBang
SDKMethod (View)EnumView
SDKResultCode (Base)Result CodeBase
SDKResultCode (IAP)Result CodeIAP
SDKResultCode (Log)Result CodeLog
SDKResultCode (PCBang)Result CodePCBang
SDKResultCode (View)Result CodeView
StoveLanguageEnumBase
StoveOverlayStateEnumBase
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
WebViewModeEnumBase

Base_AccessTokenRenewed

Kind Function · Module Base · Version 3.3.0

Description

When the AccessToken available in Stove is renewed, the newly issued AccessToken is passed to the registered callback function.

This is not a function that issues a new AccessToken.

Declaration

cpp
void Base_AccessTokenRenewed(OnRenewTokenFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnRenewTokenFinishedYThis is a callback function that receives the newly issued AccessToken.

Returns

None

Callback

cpp
typedef void(__cdecl* OnRenewTokenFinished)(CallbackResult callbackResult, StovePCToken token);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.
tokenStovePCTokenHere is the information on the newly issued tokens. Look them up using GetAccessToken() and GetExpireIn().

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

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::Base::SDKMethod::ACCESS_TOKEN_RENEWED.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMonFinished is nullptr.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OThere was a temporary issue. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary problem has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
Callback callbackResultCallback ScopeThis is a local object passed by value. There is no need to free it separately.
Callback token (StovePCToken)Callback ScopeSince it is passed by value, there is no need to free it. However, since the const wchar_t* returned by the getter points to the object's internal buffer, you must copy the string inside the callback if you plan to use it outside the callback.

Example

cpp
using namespace Stove::PCSDK::Base;

Base_AccessTokenRenewed([](CallbackResult callbackResult, StovePCToken token)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
        const wchar_t* newAccessToken = token.GetAccessToken();
        int32_t expireIn = token.GetExpireIn();
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

  • This is a callback that is called repeatedly every time the token is renewed. It is not a one-time callback.
  • If you need the latest token each time, you can look it up as needed using Base_GetAccessToken.
  • The name of the older version with the same functionality is Base_GetRenewToken. The new code uses this function.

See Also


Base_GetAccessToken

Kind Function · Module Base · Version 3.0.0.4

Description

Retrieves the AccessToken available in Stove.

Declaration

cpp
Result Base_GetAccessToken(wchar_t* accessToken, uint32_t length);

Parameters

NameTypeRequiredDescription
accessTokenwchar_t*YThis is a buffer for retrieving a valid AccessToken.
lengthuint32_tYaccessToken is the length of the array.

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() is equal to true, the call was successful.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::Base::SDKMethod::GET_ACCESS_TOKEN.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMaccessToken is nullptr, or length is 0, or the buffer is too small, so the resulting string was truncated.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
19INVALID_ACCESS_TOKENThe AccessToken you have is invalid (e.g., expired).OYour login session has expired. Please close the game and restart it. [OK]
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary problem has occurred. Please try again. [OK]

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

  • 19 INVALID_ACCESS_TOKEN — You must restart the game after it closes.

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
accessToken BufferCallerSince the buffer was allocated by the caller, the caller manages it.

Example

cpp
using namespace Stove::PCSDK::Base;

wchar_t accessToken[1024] = { 0 };
Result result = Base_GetAccessToken(accessToken, 1024);
if (result.IsSuccessful())
{
    // Please implement the logic for a successful operation. Use `accessToken`.
}
else
{
    // Please implement the logic for when a failure occurs.
}

Notes

  • This function does not issue a new AccessToken; rather, it retrieves the currently valid AccessToken managed internally by the SDK.
  • 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.
  • Use Base_AccessTokenRenewed to receive a separate notification when your token is renewed.

See Also


Base_GetGds

Kind Function · Module Base · Version 3.1.0

Description

Returns information from the GDS. Retrieves the logged-in user's country information.

Declaration

cpp
Result Base_GetGds(StovePCGds* gds);

Parameters

NameTypeRequiredDescription
gdsStovePCGds*YThis is a variable that will store the logged-in user's country information.

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() equals true, the call was successful.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::Base::SDKMethod::GET_GDS.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMgds is nullptr.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
gdsCallerSince the caller allocated the object on the stack, the caller manages it. The SDK only populates the internal fields.

Example

cpp
using namespace Stove::PCSDK::Base;

StovePCGds gds;
Result result = Base_GetGds(&gds);
if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
    const wchar_t* nation = gds.GetNation();
    const wchar_t* timeZone = gds.GetTimeZone();
    bool isDefault = gds.IsDefault();
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • If IsDefault() is true, it means that the country code could not be determined from the IP address, so it was processed using Stove's default country code.
  • GetRegulation() returns the name of the regulation only when the country is subject to regulations such as the GDPR.

See Also


Base_GetOverImmersion

Kind Function · Module Base · Version 3.0.0.4

Description

For individuals in South Korea subject to gaming addiction prevention measures, the system passes the information to a callback function every hour of gameplay.

This API is for use in Korea only. It is scheduled to be deprecated. Although it has not yet been deprecated, you should use Base_OverImmersionNotification in new code.

Declaration

cpp
void Base_GetOverImmersion(OnOverImmersionFinished callback);

Parameters

NameTypeRequiredDescription
callbackOnOverImmersionFinishedYThis is a callback function that receives the results of the anti-addiction measures.

Returns

None

Callback

cpp
typedef void(__cdecl* OnOverImmersionFinished)(CallbackResult callbackResult, StovePCOverImmersion overImmersion);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.
overImmersionStovePCOverImmersionThis information is intended to help prevent excessive gaming. It provides warning messages (GetWarningMessage()), elapsed game time (GetElapsedTimeInHours(), in hours), and the minimum message display time (GetMinExposureTimeInSeconds(), in seconds).

The callback runs in the thread that called Base_RunCallback(). It is passed repeatedly every hour of gameplay.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMcallback is nullptr.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
31NOT_SUPPORTED_COUNTRYThe logged-in user's GDS country is not South Korea (kr).x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
Callback callbackResultCallback ScopeThis is a local object passed by value. There is no need to free it separately.
Callback overImmersion (StovePCOverImmersion)Callback ScopeSince it is passed by value, there is no need to free it. However, since the const wchar_t* returned by the getter points to this object's internal buffer, you must copy the string you intend to use outside the callback while you're still inside the callback.

Example

cpp
using namespace Stove::PCSDK::Base;

Base_GetOverImmersion([](CallbackResult callbackResult, StovePCOverImmersion overImmersion)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
        const wchar_t* warningMessage = overImmersion.GetWarningMessage();
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

See Also


Base_GetRenewToken

Kind Function · Module Base · Version 3.0.0.4

Description

When the AccessToken available in Stove is renewed, the newly issued AccessToken is passed to the registered callback function. This is not a function that issues a new AccessToken.

This is scheduled to be deprecated. It has not yet been deprecated, but you should use Base_AccessTokenRenewed in new code.

Declaration

cpp
void Base_GetRenewToken(OnRenewTokenFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnRenewTokenFinishedYThis is the callback function that receives the newly issued AccessToken.

Returns

None

Callback

cpp
typedef void(__cdecl* OnRenewTokenFinished)(CallbackResult callbackResult, StovePCToken token);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.
tokenStovePCTokenHere is the information on the newly issued tokens. Look them up using GetAccessToken() and GetExpireIn().

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

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMonFinished is nullptr.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
Callback callbackResultCallback ScopeThis is a local object passed by value. You do not need to free it separately.
Callback token (StovePCToken)Callback ScopeSince it is passed by value, there is no need to release it. However, since the const wchar_t* returned by the getter points to the object's internal buffer, you must copy the string inside the callback if you plan to use it outside the callback.

Example

cpp
using namespace Stove::PCSDK::Base;

Base_GetRenewToken([](CallbackResult callbackResult, StovePCToken token)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
        const wchar_t* newAccessToken = token.GetAccessToken();
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

See Also


Base_GetShutdown

Kind Function · Module Base · Version 3.0.0.4

Description

If the user is subject to the shutdown, the shutdown notification is passed to the callback function that was registered for it.

This is scheduled to be deprecated. It has not been deprecated yet, but you should use Base_ShutdownNotification in new code.

Declaration

cpp
void Base_GetShutdown(OnShutdownFinished callback);

Parameters

NameTypeRequiredDescription
callbackOnShutdownFinishedYThis is a callback function that receives the result indicating whether the user is subject to a shutdown.

Returns

None

Callback

cpp
typedef void(__cdecl* OnShutdownFinished)(CallbackResult callbackResult, StovePCShutdown shutdown);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.
shutdownStovePCShutdownThis is shutdown notification information. It provides the time remaining until shutdown (GetInadvanceTimeInMinutes(), in minutes), the notification message (GetShutdownMessage()), and the message display duration (GetExposureTimeInSeconds(), in seconds).

The callback runs in the thread that called Base_RunCallback().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMcallback is nullptr.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OThere was a temporary issue. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary problem has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
Callback callbackResultCallback ScopeThis is a local object passed by value. You do not need to free it separately.
Callback shutdown (StovePCShutdown)Callback ScopeSince it is passed by value, there is no need to release it. However, since the const wchar_t* returned by the getter points to the object's internal buffer, you must copy the string inside the callback if you plan to use it outside the callback.

Example

cpp
using namespace Stove::PCSDK::Base;

Base_GetShutdown([](CallbackResult callbackResult, StovePCShutdown shutdown)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
        const wchar_t* shutdownMessage = shutdown.GetShutdownMessage();
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

  • This API is scheduled to be deprecated. You should use Base_ShutdownNotification in new code.
  • This API is not limited to South Korea. It works even overseas if the account is subject to the shutdown policy.

See Also


Base_GetSignin

Kind Function · Module Base · Version 3.1.0

Description

Returns Signin information. Retrieves the signed-in user's registration and authentication information.

Declaration

cpp
Result Base_GetSignin(StovePCSignin* signin);

Parameters

NameTypeRequiredDescription
signinStovePCSignin*YThis variable is used to receive the logged-in user's registration and authentication information.

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() is equal to true, the call was successful.

Error Codes

If you look up Result::GetMethodCode(), you get the value Stove::PCSDK::Base::SDKMethod::GET_SIGNIN.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMsignin is nullptr.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
signinCallerSince the caller allocated the object on the stack, the caller manages it. The SDK only populates the internal fields.

Example

cpp
using namespace Stove::PCSDK::Base;

StovePCSignin signin;
Result result = Base_GetSignin(&signin);
if (result.IsSuccessful())
{
    // Please implement the logic for when the operation is successful.
    bool personVerify = signin.GetPersonVerify();
    const wchar_t* providerCode = signin.GetProviderCode();
    int accountType = signin.GetAccountType();
}
else
{
    // Please implement the logic for when a failure occurs.
}

Notes

  • GetProviderCode() is the authentication method classification code at the time of login (SO: Email, FB: Facebook, TW: Twitter, NAVER: Naver, GP: Google, APPLE: Apple, SAO: One-time code, QR: QR code login, RT: Automatic login via PC client, LINE: LINE, STEAM: Steam).
  • GetAccountType() is an account type code (2: Facebook, 3: Twitter, 6: Naver, 9: Google+, 11: Stove PC sign-up, 12: Apple, 13: LINE, 14: LINE Games, 15: Steam).

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.

Retrieves a series of clues for tracking user navigation on the Stove platform.

Declaration

cpp
Result Base_GetTraceHint(StovePCTraceHint* traceHint);

Parameters

NameTypeRequiredDescription
traceHintStovePCTraceHint*YThis is a variable that will receive information about the platform's route.

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() equals true, the call was successful.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::Base::SDKMethod::GET_TRACE_HINT.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMtraceHint is nullptr.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
traceHintCallerSince the caller allocated the object on the stack, the caller manages it. The SDK only populates the internal fields.

Example

cpp
using namespace Stove::PCSDK::Base;

StovePCTraceHint traceHint;
Result result = Base_GetTraceHint(&traceHint);
if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
    const wchar_t* sessionId = traceHint.GetSessionId();
    const wchar_t* refSessionId = traceHint.GetRefSessionId();
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • GetSessionId() is a session ID issued each time the PCSDK is initialized, and GetRefSessionId() is a session ID issued each time a reference (launcher or SGA) is executed.
  • This information is used as a log trace clue when reproducing the issue.

See Also


Base_GetUser

Kind Function · Module Base · Version 3.0.0.4

Description

Retrieves information about the logged-in user.

Declaration

cpp
Result Base_GetUser(StovePCUser* user);

Parameters

NameTypeRequiredDescription
userStovePCUser*YThis is the variable that will hold the logged-in user's information.

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() equals true, the call was successful.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::Base::SDKMethod::GET_USER.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMuser is nullptr.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For a complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
userCallerSince the caller allocated the object on the stack, the caller manages it. The SDK only populates the internal fields.

Example

cpp
using namespace Stove::PCSDK::Base;

StovePCUser user;
Result result = Base_GetUser(&user);
if (result.IsSuccessful())
{
    // Please implement the logic for a successful outcome.
    const wchar_t* nickname = user.GetNickname();
    uint64_t gameUserId = user.GetGameUserId();
}
else
{
    // Please implement the logic for when the operation fails.
}

Notes

  • StovePCUser::GetMemberNumber() is scheduled to be deprecated. You should use GetGameUserId() instead.
  • The logged-in user's country and time zone information is retrieved separately via Base_GetGds, and their registration information via Base_GetSignin.

See Also


Base_GetVersion

Kind Function · Module Base · Version 3.0.0.4

Description

Retrieves the SDK version information.

Declaration

cpp
Result Base_GetVersion(wchar_t* version, uint32_t length);

Parameters

NameTypeRequiredDescription
versionwchar_t*YThis is the buffer that will receive the version information.
lengthuint32_tYversion is the length of the array.

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() is equal to true, the call was successful.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::Base::SDKMethod::GET_VERSION.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMversion is nullptr, or length is 0, or the buffer is too small, so the resulting string was truncated.x
251PCSDK_DLL_NOT_FOUNDThe SDK DLL path could not be found.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary problem has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
version BufferCallerSince the buffer was allocated by the caller, the caller manages it.

Example

cpp
using namespace Stove::PCSDK::Base;

wchar_t version[64] = { 0 };
Result result = Base_GetVersion(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.

Base_Initialize

Kind Function · Module Base · Version 3.0.0.4

Description

Initialize the SDK.

Declaration

cpp
void Base_Initialize(const StovePCInitializeParam* initParam, OnInitializeFinished onFinished);

Parameters

NameTypeRequiredDescription
initParamconst StovePCInitializeParam*YThis is the information required for initialization (environment, game ID, app key).
onFinishedOnInitializeFinishedYThis is a callback function that receives the results of the initialization.

Returns

None

Callback

cpp
typedef void(__cdecl* OnInitializeFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.

The callback runs in the thread that called Base_RunCallback().

Error Codes

If you look up Result::GetMethodCode(), you get the value Stove::PCSDK::Base::SDKMethod::INITIALIZE.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
1FAILAn error occurred while parsing required information during the initialization of TokenActor.x
5INVALID_PARAMonFinished is nullptr, or at least one of environment, game_id, or app_key is empty.x
18ALREADY_INITIALIZEDInitialization was attempted again while already initialized.x
82NOT_FOUND_REQUIRED_INFORMATIONThe information required for initialization could not be found.x
84NEED_STOVE_LAUNCHERThe game was not launched via the Stove PC client. You must first call a function in the Base_RestartAppIfNecessary series.OThe 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]
251PCSDK_DLL_NOT_FOUNDThe SDK version check failed, so the DLL path could not be found.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

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

  • 84 NEED_STOVE_LAUNCHER — You must relaunch the game via the Stove PC client

For a complete list, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::Base;

StovePCInitializeParam initParam;
initParam.SetEnvironment(L"REAL");
initParam.SetGameID(L"YOUR_GAME_ID");
initParam.SetApplicationKey(L"YOUR_APP_KEY");

Base_Initialize(&initParam, [](CallbackResult callbackResult)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for the success case.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

See Also


Base_InitializeEx

Kind Function · Module Base · Version 3.4.1

Description

Initialize the SDK using cached parameters. Reuse the cached initialization parameters by calling functions in the Base_RestartAppIfNecessary series.

Before calling this function, you must first call a function from the Base_RestartAppIfNecessary series so that the parameters are cached.

Declaration

cpp
void Base_InitializeEx(OnInitializeFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnInitializeFinishedYThis is a callback function that receives the results of the initialization.

Returns

None

Callback

cpp
typedef void(__cdecl* OnInitializeFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.

The callback runs in the thread that called Base_RunCallback().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
1FAILAn error occurred while parsing required information during the initialization of TokenActor.x
5INVALID_PARAMEither onFinished is nullptr, or at least one of the cached environment, game_id, or app_key is empty.x
18ALREADY_INITIALIZEDInitialization was attempted again while already initialized.x
82NOT_FOUND_REQUIRED_INFORMATIONThe information required for initialization could not be found.x
84NEED_STOVE_LAUNCHERThe game was not launched via the Stove PC client. You must first call a function from the Base_RestartAppIfNecessary series.OThe game is closing because it cannot run 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]
251PCSDK_DLL_NOT_FOUNDThe SDK version check failed, and the DLL path could not be found.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

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

  • 84 NEED_STOVE_LAUNCHER — You must restart the game via the Stove PC client

For the complete list, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::Base;

Base_InitializeEx([](CallbackResult callbackResult)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

  • The Base_RestartAppIfNecessary series of functions reuses the cached environment, game ID, and app key. You do not need to recreate the initialization parameters.

See Also


Base_OpenExternalUrl

Kind Function · Module Base · Version 3.3.4

Description

Opens the URL in an external browser. When opening Stove-related domains, SSO is applied (e.g., Stove Community, Customer Support).

Declaration

cpp
void Base_OpenExternalUrl(const wchar_t* url, OnOpenExternalUrlFinished onFinished);

Parameters

NameTypeRequiredDescription
urlconst wchar_t*YThis is the URL you want to open.
onFinishedOnOpenExternalUrlFinishedYBase_OpenExternalUrl This is a callback function that receives the results of the execution.

Returns

None

Callback

cpp
typedef void(__cdecl* OnOpenExternalUrlFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.

The callback runs in the thread that called Base_RunCallback().

Error Codes

If you look up Result::GetMethodCode(), you get the value Stove::PCSDK::Base::SDKMethod::OPEN_EXTERNAL_URL.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccess (URL opened successfully)x
5INVALID_PARAMonFinished is nullptr.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
253UNMANAGED_EXCEPTIONThe browser failed to launch, or an exception occurred while it was running.OA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For a complete list, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::Base;

Base_OpenExternalUrl(L"https://www.onstove.com", [](CallbackResult callbackResult)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

  • When you open a Stove-related domain (e.g., the Stove Community or Help Center), SSO is processed simultaneously.

Base_OverImmersionNotification

Kind Function · Module Base · Version 3.3.0

Description

For individuals in South Korea subject to measures to prevent excessive gaming, the system passes the information to a callback function every hour of gameplay.

This API is for use in Korea only.

Declaration

cpp
void Base_OverImmersionNotification(OnOverImmersionFinished callback);

Parameters

NameTypeRequiredDescription
callbackOnOverImmersionFinishedYThis is a callback function that receives the results of the anti-excessive-engagement measures.

Returns

None

Callback

cpp
typedef void(__cdecl* OnOverImmersionFinished)(CallbackResult callbackResult, StovePCOverImmersion overImmersion);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.
overImmersionStovePCOverImmersionThis is information to help prevent excessive gaming. It provides warning messages (GetWarningMessage()), elapsed game time (GetElapsedTimeInHours(), in hours), and the minimum message display time (GetMinExposureTimeInSeconds(), in seconds).

The callback runs in the thread that called Base_RunCallback(). It is passed repeatedly every hour of gameplay.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::Base::SDKMethod::OVER_IMMERSION_NOTIFICATION.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMcallback is nullptr.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
31NOT_SUPPORTED_COUNTRYThe logged-in user's GDS country is not South Korea (kr).x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary problem has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
Callback callbackResultCallback ScopeThis is a local object passed by value. You do not need to release it separately.
Callback overImmersion (StovePCOverImmersion)Callback ScopeSince it is passed by value, there is no need to release it. However, since the const wchar_t* returned by the getter points to the internal buffer of this object, any string you intend to use outside the callback must be copied within the callback.

Example

cpp
using namespace Stove::PCSDK::Base;

Base_OverImmersionNotification([](CallbackResult callbackResult, StovePCOverImmersion overImmersion)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
        const wchar_t* warningMessage = overImmersion.GetWarningMessage();
        int32_t elapsedTimeInHours = overImmersion.GetElapsedTimeInHours();
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

  • This API is for use in Korea only.
  • This is a callback that is repeatedly called every hour of gameplay. It is not a one-time callback.
  • The name of the older version with the same functionality is Base_GetOverImmersion. The new code uses this function.

See Also


Base_RestartAppIfNecessary

Kind Function · Module Base · Version 3.1.0

Description

Check whether PCSDK was launched via the launcher. If the launcher is not running or the program was not launched via the launcher, relaunch it using the Stove Protocol handler.

It operates in synchronous mode. To process it asynchronously, use the Base_RestartAppIfNecessaryAsync series of functions.

Declaration

cpp
bool Base_RestartAppIfNecessary(const StovePCInitializeParam* initParam);

Parameters

NameTypeRequiredDescription
initParamconst StovePCInitializeParam*YThis is the information required for initialization (environment, game ID, app key).

Returns

TypeDescription
boolWhether re-execution is necessary. If the value is true, the code is re-executed via the Stove protocol handler, so the subsequent code does not continue to execute. If the value is false, the code has already been executed via the launcher, so Base_Initialize() is called next.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::Base::SDKMethod::RESTART_APP_IF_NECESSARY.

For possible error codes, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::Base;

StovePCInitializeParam initParam;
initParam.SetEnvironment(L"REAL");
initParam.SetGameID(L"YOUR_GAME_ID");
initParam.SetApplicationKey(L"YOUR_APP_KEY");

bool needRestart = Base_RestartAppIfNecessary(&initParam);
if (!needRestart)
{
    // Please implement the logic for a successful outcome. Then, call Base_Initialize().
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

See Also


Base_RestartAppIfNecessaryAsync

Kind Function · Module Base · Version 3.3.0

Description

Check whether PCSDK was launched via the launcher. If the launcher is not running or the program was not launched via the launcher, relaunch it using the Stove Protocol handler.

It operates in asynchronous mode. waitTimeMillisec is the time spent waiting to confirm whether the application was launched via the launcher; the recommended value is 60,000 (1 minute).

Declaration

cpp
void Base_RestartAppIfNecessaryAsync(const StovePCInitializeParam* initParam, uint32_t waitTimeMillisec, OnRestartAppIfNecessaryAsyncFinished onFinished);

Parameters

NameTypeRequiredDescription
initParamconst StovePCInitializeParam*YThis is the information required for initialization (environment, game ID, app key).
waitTimeMillisecuint32_tYThis is the time to wait to verify whether the application was launched via the launcher. The recommended value is 60,000 (1 minute).
onFinishedOnRestartAppIfNecessaryAsyncFinishedYThis is a callback function that receives the result indicating whether the application was launched from the launcher.

Returns

None

Callback

cpp
typedef void(__cdecl* OnRestartAppIfNecessaryAsyncFinished)(CallbackResult callbackResult, bool restartAppIfNecessary);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.
restartAppIfNecessaryboolWhether the app needs to be restarted.

The callback runs in the thread that called Base_RunCallback(). The callback is also passed even if a retry is required.

Error Codes

If you look up Result::GetMethodCode(), you will get the value Stove::PCSDK::Base::SDKMethod::RESTART_APP_IF_NECESSARY_ASYNC.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccess (including cases where the previous call had already been completed)x
29ASYNC_OPERATION_IN_PROGRESSThe asynchronous restart operation that was called just a moment ago is still in progress.x
30BASE_UNINITIALIZEDThe IPC connection status has reverted to its state prior to the initialization.x
87IPC_CONNECT_FAILEDThe IPC connection to the launcher failed.OThe 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_RECEIVEDThe encryption key was not received from the launcher.OThe 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_TIMEOUTNo response was received from the launcher within the specified timeout period (waitTimeMillisec).OThe 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]
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

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

  • 87 IPC_CONNECT_FAILED — You must relaunch the game through the Stove PC client
  • 88 IPC_AES_KEY_NOT_RECEIVED — You must restart the game via the Stove PC client
  • 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.

This error occurs if you run the game executable directly without launching the Stove PC client. When you exit the game, the Stove launcher will launch automatically.

For the complete list, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::Base;

StovePCInitializeParam initParam;
initParam.SetEnvironment(L"REAL");
initParam.SetGameID(L"YOUR_GAME_ID");
initParam.SetApplicationKey(L"YOUR_APP_KEY");

Base_RestartAppIfNecessaryAsync(&initParam, 60000, [](CallbackResult callbackResult, bool restartAppIfNecessary)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome. If `restartAppIfNecessary` is false, call `Base_Initialize()` next.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

See Also


Base_RestartAppIfNecessaryAsyncEx

Kind Function · Module Base · Version 3.4.0

Description

Check whether PCSDK was launched via the launcher. If the launcher is not running or the program was not launched via the launcher, relaunch it using the Stove Protocol handler.

It works the same as Base_RestartAppIfNecessaryAsync, but the launchLauncher argument allows you to specify whether to launch the launcher if it is not already running.

Declaration

cpp
void Base_RestartAppIfNecessaryAsyncEx(const StovePCInitializeParam* initParam, uint32_t waitTimeMillisec, bool launchLauncher, OnRestartAppIfNecessaryAsyncFinished onFinished);

Parameters

NameTypeRequiredDescription
initParamconst StovePCInitializeParam*YThis is the information needed for initialization (environment, game ID, app key).
waitTimeMillisecuint32_tYThis is the time to wait to confirm whether the application was launched via the launcher. The recommended value is 60,000 (1 minute).
launchLauncherboolYThis determines whether to launch the launcher when the application is not running through the launcher. A value of true means launch the launcher, while a value of false means do not launch it.
onFinishedOnRestartAppIfNecessaryAsyncFinishedYThis is a callback function that receives the result indicating whether the application was launched from the launcher.

Returns

None

Callback

cpp
typedef void(__cdecl* OnRestartAppIfNecessaryAsyncFinished)(CallbackResult callbackResult, bool restartAppIfNecessary);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.
restartAppIfNecessaryboolWhether the app needs to be restarted.

The callback runs in the thread that called Base_RunCallback(). The callback is passed even if a retry is required.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccess (including cases where the previous call had already been completed)x
29ASYNC_OPERATION_IN_PROGRESSThe asynchronous restart operation that was called just a moment ago is still in progress.x
30BASE_UNINITIALIZEDThe IPC connection state reverted to the state before initialization while waiting.x
87IPC_CONNECT_FAILEDThe IPC connection to the launcher failed.OThe 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_RECEIVEDThe encryption key was not received from 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 do not have the client installed, please install it from the Stove website.[OK]
89IPC_TIMEOUTNo response was received from the launcher within the specified timeout (waitTimeMillisec).OThe game is closing because it cannot be launched 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]
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

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

  • 87 IPC_CONNECT_FAILED — You must restart the game via the Stove PC client
  • 88 IPC_AES_KEY_NOT_RECEIVED — You must restart the game via the Stove PC client
  • 89 IPC_TIMEOUT — You must relaunch 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.

This error occurs if you run the game executable directly without launching the Stove PC client. When you exit the game, the Stove launcher will launch automatically.

For a complete list, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::Base;

StovePCInitializeParam initParam;
initParam.SetEnvironment(L"REAL");
initParam.SetGameID(L"YOUR_GAME_ID");
initParam.SetApplicationKey(L"YOUR_APP_KEY");

Base_RestartAppIfNecessaryAsyncEx(&initParam, 60000, true, [](CallbackResult callbackResult, bool restartAppIfNecessary)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome. If `restartAppIfNecessary` is false, call `Base_Initialize()` next.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

  • Unlike Base_RestartAppIfNecessaryAsync, you can use the launchLauncher argument to control whether the launcher runs automatically.
  • To pass waitTimeMillisec and launchLauncher as a single structure, use Base_RestartAppIfNecessaryAsyncEx2.

See Also


Base_RestartAppIfNecessaryAsyncEx2

Kind Function · Module Base · Version 3.4.1

Description

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

Check whether PCSDK was launched via the launcher. If the launcher is not running or the program was not launched via the launcher, relaunch it using the Stove Protocol handler.

It functions the same as Base_RestartAppIfNecessaryAsyncEx, but the waitTimeMillisec and launchLauncher options are included within the StovePCInitializeParamEx2 structure.

Declaration

cpp
void Base_RestartAppIfNecessaryAsyncEx2(const StovePCInitializeParamEx2* initParam, OnRestartAppIfNecessaryAsyncFinished onFinished);

Parameters

NameTypeRequiredDescription
initParamconst StovePCInitializeParamEx2*YThis information is required for initialization. It includes not only the environment, game ID, and app key, but also waitTimeMillisec, launchLauncher, and platformName.
onFinishedOnRestartAppIfNecessaryAsyncFinishedYThis is a callback function that receives the result indicating whether the application was launched from the launcher.

Returns

None

Callback

cpp
typedef void(__cdecl* OnRestartAppIfNecessaryAsyncFinished)(CallbackResult callbackResult, bool restartAppIfNecessary);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.
restartAppIfNecessaryboolWhether the app needs to be restarted.

The callback runs in the thread that called Base_RunCallback(). The callback is also passed even if a re-execution is required.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccess (including cases where the previous call had already been completed)x
29ASYNC_OPERATION_IN_PROGRESSThe asynchronous restart operation that was called immediately prior is still in progress.x
30BASE_UNINITIALIZEDThe IPC connection status has reverted to its state prior to initialization.x
87IPC_CONNECT_FAILEDThe IPC connection to the launcher failed.OThe 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_RECEIVEDThe encryption key was not received from the launcher.OThe 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_TIMEOUTNo response was received from the launcher within the specified timeout (initParam.wait_time_millisec).OThe 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]
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.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 — You must restart the game via the Stove PC client
  • 88 IPC_AES_KEY_NOT_RECEIVED — You must relaunch the game via the Stove PC client
  • 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.

This error occurs if you run the game executable directly without launching the Stove PC client. When you exit the game, the Stove launcher will launch automatically.

For the complete list, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::Base;

StovePCInitializeParamEx2 initParam;
initParam.SetEnvironment(L"REAL");
initParam.SetGameID(L"YOUR_GAME_ID");
initParam.SetApplicationKey(L"YOUR_APP_KEY");
initParam.SetWaitTimeMillisec(60000);
initParam.SetLaunchLauncher(true);
initParam.SetPlatformName(L"Stove");

Base_RestartAppIfNecessaryAsyncEx2(&initParam, [](CallbackResult callbackResult, bool restartAppIfNecessary)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for when the operation succeeds. If `restartAppIfNecessary` is false, call `Base_Initialize()` next.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

  • This method passes waitTimeMillisec, launchLauncher, and platformName as a single StovePCInitializeParamEx2 structure.
  • StovePCInitializeParamEx2 is a structure added in version 3.4.1.

See Also


Base_RunCallback

Kind Function · Module Base · Version 3.0.0.4

Description

Executes the callback functions registered in each SDK module. Executes all registered callbacks.

It must be called within the game loop. Do not use it by repeatedly calling this function alone in the form while(true).

Declaration

cpp
void Base_RunCallback();

Parameters

None

Returns

None

Error Codes

None

Example

cpp
using namespace Stove::PCSDK::Base;

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

    Base_RunCallback();

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

Notes

  • Callbacks for all asynchronous APIs are executed on the thread that called this function. They are not executed on an internal SDK thread.
  • To specify a wait time, use Base_RunCallbackWithTimeout.

See Also


Base_RunCallbackWithTimeout

Kind Function · Module Base · Version 3.3.0

Description

Executes the callback functions registered in each SDK module. When executing a registered callback, the system tracks the elapsed time and stops execution if it exceeds timeoutMillisec. Execution resumes the next time the callback is called.

Declaration

cpp
void Base_RunCallbackWithTimeout(uint32_t timeoutMillisec);

Parameters

NameTypeRequiredDescription
timeoutMillisecuint32_tYThis is the timeout duration (in milliseconds).

Returns

None

Error Codes

None

Example

cpp
using namespace Stove::PCSDK::Base;

// Game Loop Example (Maximum 10 ms Wait)
while (isGameRunning)
{
    // ... Game Logic ...

    Base_RunCallbackWithTimeout(10);

    // ... rendering and the rest of the loop logic ...
}

Notes

  • If the count exceeds timeoutMillisec, the remaining callbacks will continue to execute during the next call.
  • Use Base_RunCallback for general purposes, and use this function when you need to control the wait time.

See Also


Base_SetGameProfile

Kind Function · Module Base · Version 3.0.0.4

Description

Set up your game profile.

Declaration

cpp
Result Base_SetGameProfile(const StovePCGameProfile* gameProfile);

Parameters

NameTypeRequiredDescription
gameProfileconst StovePCGameProfile*YThis is the game profile information (World ID, Character ID).

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() equals true, the call was successful.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::Base::SDKMethod::SET_GAME_PROFILE.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMgameProfile is nullptr.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary problem has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::Base;

StovePCGameProfile gameProfile(L"world_01", 12345);

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

  • StovePCGameProfile can be set directly to worldId or characterNumber as its constructor, or it can be set to SetWorldId() or SetCharacterNumber().

Base_SetLanguage

Kind Function · Module Base · Version 3.1.0

Description

Configure the SDK's language settings. Supported languages are the StoveLanguage enumeration values (system, en, ko, ja, zh_cn, zh_tw, de, fr, es, pt, th, vi).

To specify a language as a string, use Base_SetLanguageEx.

If you are setting up a new integration, use Base_SetLanguageEx. You can specify even languages not listed in the dropdown as strings, so you can continue using them even if new languages are added later.

Declaration

cpp
Result Base_SetLanguage(StoveLanguage language);

Parameters

NameTypeRequiredDescription
languageStoveLanguageYLanguage information.

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() equals true, the call was successful.

Error Codes

If you look up Result::GetMethodCode(), you will get the value Stove::PCSDK::Base::SDKMethod::SET_LANGUAGE.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMlanguage is a language code that is not supported.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OThere was a temporary issue. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OThere was a temporary issue. Please try again. [OK]

For the complete list, see SDKResultCode.

Example

cpp
using namespace 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

  • If you need to specify a language not listed in StoveLanguage, use the string-based Base_SetLanguageEx.

See Also


Base_SetLanguageEx

Kind Function · Module Base · Version 3.4.0

Description

Configure the language settings for PCSDK. Unlike Base_SetLanguage, the language is specified as a string.

Declaration

cpp
Result Base_SetLanguageEx(const wchar_t* language);

Parameters

NameTypeRequiredDescription
languageconst wchar_t*YThis is a language information string.

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() is equal to true, the call was successful.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMlanguage is either nullptr or an unsupported language code.x
16BASE_NOT_INITIALIZEDThis method was called before the SDK was initialized.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OThere was a temporary issue. Please try again. [OK]

For the complete list, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::Base;

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

Notes

  • The difference from Base_SetLanguage is that you can specify a language code that is not included in the list of values in StoveLanguage.

See Also


Base_ShutdownNotification

Kind Function · Module Base · Version 3.3.0

Description

If the user is subject to a shutdown, the shutdown notification is passed to the callback function that was registered for it.

This API is not limited to South Korea. It works for users outside of South Korea as well, provided their accounts are subject to the shutdown policy.

Declaration

cpp
void Base_ShutdownNotification(OnShutdownFinished callback);

Parameters

NameTypeRequiredDescription
callbackOnShutdownFinishedYThis is a callback function that receives the result indicating whether the user is subject to a shutdown.

Returns

None

Callback

cpp
typedef void(__cdecl* OnShutdownFinished)(CallbackResult callbackResult, StovePCShutdown shutdown);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.
shutdownStovePCShutdownThis is shutdown notification information. It provides the time remaining until shutdown (GetInadvanceTimeInMinutes(), in minutes), the notification message (GetShutdownMessage()), and the message display duration (GetExposureTimeInSeconds(), in seconds).

The callback runs in the thread that called Base_RunCallback().

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::Base::SDKMethod::SHUTDOWN_NOTIFICATION.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMcallback is nullptr.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
Callback callbackResultCallback ScopeThis is a local object passed by value. You do not need to free it separately.
Callback shutdown (StovePCShutdown)Callback ScopeSince it is passed by value, there is no need to free it. However, since the const wchar_t* returned by the getter points to the object's internal buffer, any string to be used outside the callback must be copied within the callback.

Example

cpp
using namespace Stove::PCSDK::Base;

Base_ShutdownNotification([](CallbackResult callbackResult, StovePCShutdown shutdown)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
        const wchar_t* shutdownMessage = shutdown.GetShutdownMessage();
        int32_t inadvanceTimeInMinutes = shutdown.GetInadvanceTimeInMinutes();
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

  • This API is not exclusive to South Korea. It works even overseas if your account is subject to the shutdown policy.
  • The name of the older version with the same functionality is Base_GetShutdown. The new code uses this function.

See Also


Base_UnInitialize

Kind Function · Module Base · Version 3.0.0.4

Description

Releases the SDK's resources. This function pairs with Base_Initialize / Base_InitializeEx.

You must call this function before exiting the game. Since this function aggregates the game playtime and updates the server with that data, if you terminate the process without calling it, the playtime for that session will be omitted.

Declaration

cpp
Result Base_UnInitialize();

Parameters

None

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() is equal to true, the call was successful.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::Base::SDKMethod::UNINITIALIZE.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::Base;

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

Notes

  • This is the termination function that pairs with Base_Initialize() / Base_InitializeEx().
  • If there are multiple ways for the game to end (normal exit, exception exit, forced exit), ensure that this function is called from all of them. The playtime statistics are finalized at this point.

See Also


Base_VietnamAgeRatingNotification

Kind Function · Module Base · Version 3.4.1

Description

Passes the overlay information for the Vietnam age rating guide to the registered callback function.

This is an API specific to Vietnam. It operates solely using the launcher's SHOW/HIDE packets, without a timer. It is a one-time callback and must be called after rendering is possible.

Declaration

cpp
void Base_VietnamAgeRatingNotification(OnVietnamAgeRatingFinished callback);

Parameters

NameTypeRequiredDescription
callbackOnVietnamAgeRatingFinishedYThis is a callback function that receives the results of the Vietnam age rating check.

Returns

None

Callback

cpp
typedef void(__cdecl* OnVietnamAgeRatingFinished)(CallbackResult callbackResult, StovePCVietnamAgeRatingInfo vietnamAgeRatingInfo);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.
vietnamAgeRatingInfoStovePCVietnamAgeRatingInfoHere is the age rating information for Vietnam. Overlay display status (GetOverlayState()), overlay color (GetOverlayType(), 0=black·1=white), overlay size (GetOverlayScale(), 0.0–1.0), overlay opacity (GetOverlayOpacity(), 0.0–1.0), game rating (GetAgeRating(), 0=All Ages·12=Ages 12·16=Ages 16·18=Ages 18), notification message (GetAgeRatingMessage()), display position X and Y (GetDisplayPositionX()/GetDisplayPositionY()), and language code (GetLanguage(), e.g., "ko", "en", "ja", "vi", "zh-cn", "zh-tw", "th").

The callback runs in the thread that called Base_RunCallback(). It is a one-time callback and must be called after the system is ready for rendering. It operates solely via the launcher's SHOW/HIDE packets, without a timer.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::Base::SDKMethod::VIETNAM_AGE_RATING_NOTIFICATION.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMcallback is nullptr.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
31NOT_SUPPORTED_COUNTRYThe logged-in user's GDS country is not Vietnam (vn).x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For a complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
Callback callbackResultCallback ScopeThis is a local object passed by value. You do not need to free it separately.
Callback vietnamAgeRatingInfo (StovePCVietnamAgeRatingInfo)Callback ScopeSince it is passed by value, there is no need to dereference it. However, since the const wchar_t* returned by the getter points to the object's internal buffer, you must copy the string inside the callback if you plan to use it outside the callback.

Example

cpp
using namespace Stove::PCSDK::Base;

Base_VietnamAgeRatingNotification([](CallbackResult callbackResult, StovePCVietnamAgeRatingInfo vietnamAgeRatingInfo)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
        StoveOverlayState overlayState = vietnamAgeRatingInfo.GetOverlayState();
        const wchar_t* message = vietnamAgeRatingInfo.GetAgeRatingMessage();
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

  • This is an API specifically for Vietnam.
  • This is a one-time callback. It must be called after rendering is complete.

See Also


Base_VietnamOverimmersionNotification

Kind Function · Module Base · Version 3.4.1

Description

For users in Vietnam subject to anti-excessive gaming measures, information is passed to a callback function that registers data periodically while they are playing games.

This is an API specifically for Vietnam.

Declaration

cpp
void Base_VietnamOverimmersionNotification(OnVietnamOverimmersionFinished callback);

Parameters

NameTypeRequiredDescription
callbackOnVietnamOverimmersionFinishedYThis is a callback function that receives the results of Vietnam's efforts to prevent excessive engagement.

Returns

None

Callback

cpp
typedef void(__cdecl* OnVietnamOverimmersionFinished)(CallbackResult callbackResult, StovePCVietnamOverimmersionInfo vietnamOverimmersionInfo);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.
vietnamOverimmersionInfoStovePCVietnamOverimmersionInfoHere is information on Vietnam's hyper-immersion. Overlay display status (GetOverlayState()), overlay color options (GetOverlayType(), 0=Black·1=White), overlay size (GetOverlayScale(), 0.0–1.0), overlay opacity (GetOverlayOpacity(), 0.0–1.0), game rating (GetAgeRating(), 0=All Ages·12=Ages 12·16=Ages 16·18=Ages 18), Excessive Gaming Warning Message (GetOverimmersionMessage()), Design Message with Markup Tags (GetStyledMessage()), Game Playtime (GetElapsedTime(), in minutes), message display duration (GetExposureTime(), in seconds), Expand animation duration (GetExpandAnimationTime(), in seconds), display position X and Y (GetDisplayPositionX()/GetDisplayPositionY()), and language code (GetLanguage()).

The callback runs in the thread that called Base_RunCallback(). It is passed repeatedly at regular intervals during gameplay.

Error Codes

If you look up Result::GetMethodCode(), you will get the value Stove::PCSDK::Base::SDKMethod::VIETNAM_OVER_IMMERSION_NOTIFICATION.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
5INVALID_PARAMcallback is nullptr.x
16BASE_NOT_INITIALIZEDThis call was made before the SDK was initialized.x
31NOT_SUPPORTED_COUNTRYThe logged-in user's GDS country is not Vietnam (vn).x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
Callback callbackResultCallback ScopeThis is a local object passed by value. It does not need to be released separately.
Callback vietnamOverimmersionInfo (StovePCVietnamOverimmersionInfo)Callback ScopeSince it is passed by value, there is no need to free it. However, since the const wchar_t* returned by the getter points to the object's internal buffer, you must copy the string inside the callback if you intend to use it outside the callback.

Example

cpp
using namespace Stove::PCSDK::Base;

Base_VietnamOverimmersionNotification([](CallbackResult callbackResult, StovePCVietnamOverimmersionInfo vietnamOverimmersionInfo)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
        const wchar_t* message = vietnamOverimmersionInfo.GetOverimmersionMessage();
        int32_t elapsedTime = vietnamOverimmersionInfo.GetElapsedTime();
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

  • This is an API specifically for Vietnam.
  • This is a callback that is repeatedly invoked at regular intervals during gameplay. It is not a one-time callback.

See Also


CallbackResult

Kind Struct · Module Base · Version 3.0.0.4

Description

This is the result structure passed as the first argument to the callback function of an asynchronous API. It contains Result and includes a detailed message explaining the cause of the error, the error value generated externally, and an identifier for the caller.

CallbackResult is a common type defined in the Stove::PCSDK namespace, just like Result. It is not specific to Stove::PCSDK::Base; asynchronous callbacks for all other features, such as payment and pop-ups, also use the same CallbackResult type. It is a value type and is passed as a value to the callback function. No separate deallocation call is required; however, when the callback returns, any internal buffers (such as errorMessage) are destroyed along with it.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        struct CallbackResult
        {
        public:
            Result GetResult() const;
            const wchar_t* GetErrorMessage() const;
            int32_t GetExternalError() const;

        public:
            Result result;
            wchar_t* errorMessage = nullptr;
            int32_t externalError;
            uint64_t callerIdentifier;
        };
    }
}

Members

NameTypeAccessDescription
result / GetResult()ResultReadThis is the value of Result in this callback. It is a public field, and you can also retrieve the same value using a getter.
errorMessage / GetErrorMessage()const wchar_t*ReadThis is a detailed message explaining the cause of the error.
externalError / GetExternalError()int32_tReadThis is an error value generated externally (HTTP error or API result code).
callerIdentifieruint64_tReadThis is the identifier for the caller.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

void __cdecl OnInitializeFinishedCallback(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

  • It is passed as the first callback argument to callback-based asynchronous APIs such as Base_Initialize() and Base_RestartAppIfNecessaryAsync().
  • The callback runs in the thread that called Base_RunCallback().
  • callerIdentifier is an identifier used to distinguish the caller.

See Also


CloseButtonType

Kind Enum · Module View · Version 3.0.0.4

Description

An enumeration that identifies the types of pop-up close buttons. It is Stove::PCSDK::View::CloseButtonType.

Although this enumeration is declared in the header, it is not directly referenced in the signatures of the other public functions and structures (ViewSDK.h, ViewSDKStructures.h) of the legacy C++ interface covered in this document.

Declaration

cpp
enum class CloseButtonType : uint32_t
{
    CUSTOM = 0,
    PRESET_01 = 1,
    PRESET_02 = 2,
    PRESET_03 = 3,
    PRESET_04 = 4,
    PRESET_05 = 5,
    PRESET_06 = 6,
    DEFAULT = 7,
};

Enum Values

CodeNameDescription
0CUSTOMCustom
1PRESET_01Preset 1
2PRESET_02Preset 2
3PRESET_03Preset 3
4PRESET_04Preset 4
5PRESET_05Preset 5
6PRESET_06Preset 6
7DEFAULTDefault

Example

cpp
using namespace Stove::PCSDK::View;

CloseButtonType type = CloseButtonType::DEFAULT;

Notes

  • No public functions or structures that accept this enumeration as a parameter or return value were found in the ViewSDK.h and ViewSDKStructures.h ranges.
  • This value is used internally within the SDK. When configuring coupon pop-ups or customer support pop-ups, it is internally set as the default value (PRESET_01) for the "Close Pop-up" button. However, there is no public API that allows the game to directly retrieve or specify this value.

See Also


DiscountType

Kind Enum · Module IAP · Version 3.0.0.4

Description

Indicates the product's discount method. You can verify this by checking the GetDiscountType() value of StovePCProduct / StovePCProductEx, which is passed via the IAP_FetchProducts / IAP_FetchProductsEx callback. This is valid only when IsDiscount() equals true.

Declaration

cpp
enum class DiscountType : uint32_t
{
    NONE = 0,
    FIXED_RATE = 1,
    FLAT_RATE = 2,
};

Enum Values

CodeNameDescription
0NONENo discount
1FIXED_RATEFixed-Rate Discount
2FLAT_RATEFlat-Rate Discount

Example

cpp
using namespace Stove::PCSDK::IAP;

if (product.IsDiscount() && product.GetDiscountType() == DiscountType::FIXED_RATE)
{
    int32_t discountValue = product.GetDiscountTypeValue();
}

Notes

  • The actual meaning of the discount amount (percentage or fixed monetary unit) should be verified using GetDiscountTypeValue().

See Also


IAP_CloseAllPopups

Kind Function · Module IAP · Version 3.1.3

Description

Closes all pop-ups opened through the payment feature.

Declaration

cpp
Result IAP_CloseAllPopups();

Parameters

None

Returns

TypeDescription
ResultFunction call result. Success is determined by result.IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe payment function has not been initialized. You must first call IAP_Initialize().x
80VIEWUI_NOT_INITIALIZEDThe internal UI module used to display pop-ups has not been initialized.x
89WEBVIEW_CLOSE_ALL_FAILFailed to close all open pop-ups.x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OA temporary problem has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::IAP;

Result result = IAP_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

  • This function is synchronous and does not accept callbacks.
  • This applies only to pop-ups triggered by the payment feature (such as purchase, terms of service agreement, one-time payment, and game withdrawal). Pop-ups triggered by the pop-up feature are not included.

See Also


IAP_ConfirmPurchase

Kind Function · Module IAP · Version 3.0.0.4

Description

After completing a purchase, verify that it was processed correctly using the purchase ID (order master number). If StovePCPurchaseOperation of IAP_StartPurchase is DEFAULT or WITH_WEBVIEW, call this function after payment is complete to confirm the purchase. Pass the StovePCPurchaseResult::GetTransactionMasterNumber() value received as the result of IAP_StartPurchase to transactionMasterNumber.

Declaration

cpp
void IAP_ConfirmPurchase(int64_t transactionMasterNumber, OnConfirmPurchaseFinished onFinished);

Parameters

NameTypeRequiredDescription
transactionMasterNumberint64_tYOrder Master Number
onFinishedOnConfirmPurchaseFinishedYCallback function that registers information regarding the completion of a product purchase

Returns

None

Callback

cpp
typedef void(__cdecl* OnConfirmPurchaseFinished)(CallbackResult callbackResult, bool status, StovePCPurchasedProduct* purchasedProducts, uint32_t purchasedProductSize, StovePCChargeInfo* chargeInfos, uint32_t chargeInfoSize);
NameTypeDescription
callbackResultCallbackResultCallback result value
statusboolPurchase Status
purchasedProductsStovePCPurchasedProduct*Information on Purchased Items StovePCPurchasedProduct array
purchasedProductSizeuint32_tpurchasedProducts Array size
chargeInfosStovePCChargeInfo*Currency (charge) information used for payment StovePCChargeInfo array
chargeInfoSizeuint32_tchargeInfos Array size

It runs in the thread that called Base_RunCallback(). It is passed only once per call.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe payment feature has not been initialized. You must first call IAP_Initialize().x
21NULL_ENTITYUnable to retrieve language settings.x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
Callback callbackResultCallback ScopeThis is a local object passed by value. You do not need to free it separately.
The purchasedProducts and chargeInfos arrays of the callback and their respective elementsSDKDo not unwrap. It will be invalidated once the callback completes, so you must copy any necessary values within the callback.

Example

cpp
using namespace Stove::PCSDK::IAP;

void __cdecl OnConfirmPurchaseFinished(CallbackResult callbackResult, bool status,
    StovePCPurchasedProduct* purchasedProducts, uint32_t purchasedProductSize,
    StovePCChargeInfo* chargeInfos, uint32_t chargeInfoSize)
{
    if (callbackResult.GetResult().IsSuccessful() && status)
    {
        // Please implement the logic for a successful outcome.
        for (uint32_t i = 0; i < purchasedProductSize; ++i)
        {
            int64_t productId = purchasedProducts[i].GetProductId();
        }
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

// Call (where `transactionMasterNumber` is the value returned by `GetTransactionMasterNumber()` in the result of `IAP_StartPurchase()`)
IAP_ConfirmPurchase(transactionMasterNumber, OnConfirmPurchaseFinished);

Notes

  • This function is asynchronous, and the result is returned only via the onFinished callback.
  • If StovePCPurchaseOperation of IAP_StartPurchase is WITH_WEBVIEW_AND_CONFIRM_RESULT, the SDK automatically calls this function, so you do not need to call it separately.
  • Whether status and callbackResult are successful is a separate matter. Even if the call itself was successful, if status is false, the purchase has not yet been finalized.

See Also


IAP_FetchInventory

Kind Function · Module IAP · Version 3.0.0.4

Description

Retrieves the list of all purchased items. The results are passed to the onFinished callback.

You must initialize it to IAP_Initialize() before calling it.

Declaration

cpp
void IAP_FetchInventory(OnFetchInventoryFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnFetchInventoryFinishedYA callback function that registers information about the entire list of purchased items

Returns

None

Callback

cpp
typedef void(__cdecl* OnFetchInventoryFinished)(CallbackResult callbackResult, StovePCInventoryItem* inventoryItems, uint32_t inventoryItemSize);
NameTypeDescription
callbackResultCallbackResultCallback result value
inventoryItemsStovePCInventoryItem*Information on Purchased Items StovePCInventoryItem array
inventoryItemSizeuint32_tinventoryItems Array size

It runs on the thread that called Base_RunCallback(). It is passed only once per call.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe payment functionality has not been initialized. You must first call IAP_Initialize().x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
Callback callbackResultCallback ScopeThis is a local object passed by value. You do not need to release it separately.
The inventoryItems array of callbacks and each elementSDKDo not unwrap. The object will be invalidated once the callback completes, so you must copy any necessary values within the callback.

Example

cpp
using namespace Stove::PCSDK::IAP;

void __cdecl OnFetchInventoryFinished(CallbackResult callbackResult, StovePCInventoryItem* inventoryItems, uint32_t inventoryItemSize)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

// Call
IAP_FetchInventory(OnFetchInventoryFinished);

Notes

  • This function is asynchronous, and the result is returned only via the onFinished callback.

See Also


IAP_FetchProducts

Kind Function · Module IAP · Version 3.0.0.4 · Deprecated

Description

Do not use this default format. Use IAP_FetchProductsEx instead.

Retrieves product information registered on the Stove platform. You can specify the category, page number, and page size using params.

You must initialize it to IAP_Initialize() before calling it.

Declaration

cpp
void IAP_FetchProducts(const StovePCFetchProductParam* params, OnFetchProductsFinished onFinished);

Parameters

NameTypeRequiredDescription
paramsconst StovePCFetchProductParam*YProduct information to retrieve (category ID, page number, page size)
onFinishedOnFetchProductsFinishedYCallback function that registers the retrieved product information

Returns

None

Callback

cpp
typedef void(__cdecl* OnFetchProductsFinished)(CallbackResult callbackResult, StovePCProduct* products, uint32_t productSize);
NameTypeDescription
callbackResultCallbackResultCallback result value
productsStovePCProduct*StovePCProduct arrays retrieved
productSizeuint32_tproducts Array size

It runs in the thread that called Base_RunCallback(). It is passed only once per call.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe payment functionality has not been initialized. You must first call IAP_Initialize().x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OThere was a temporary issue. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
paramsCallerThis is a standard C++ object created by the caller. There is no need to call a separate deallocation function after the function returns; the destructor automatically cleans up the resources when the object goes out of scope.
Callback callbackResultCallback ScopeThis is a local object passed by value. You do not need to free it separately.
The products array of callbacks and each elementSDKDo not unwrap. The callback will be invalidated once it completes, so you must copy any necessary values within the callback.

Example

cpp
using namespace Stove::PCSDK::IAP;

void __cdecl OnFetchProductsFinished(CallbackResult callbackResult, StovePCProduct* products, uint32_t productSize)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
        for (uint32_t i = 0; i < productSize; ++i)
        {
            int64_t productId = products[i].GetProductId();
        }
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

// Call
StovePCFetchProductParam params;
params.SetPageNumber(1);
params.SetPageSize(20);

IAP_FetchProducts(&params, OnFetchProductsFinished);

Notes

  • This function is asynchronous, and the result is returned only via the onFinished callback.
  • If you leave the category ID for params blank, the entire product list will be retrieved. If you do not specify a page number, 1 is used as the default; if you do not specify a page size, 20 is used as the default.
  • Always use IAP_FetchProductsEx for actual integration. Purchase-eligible codes (purchase_availability_code) are also only available in the Ex variant.

See Also


IAP_FetchProductsEx

Kind Function · Module IAP · Version 3.4.1

Description

Retrieves product information registered on the Stove platform. You can specify the category, page number, and page size using params.

The difference from IAP_FetchProducts() is that the product information passed to the callback is StovePCProductEx instead of StovePCProduct. StovePCProductEx provides the purchase availability code (purchase_availability_code) in addition to all the fields in StovePCProduct. Even if the purchase availability code is 1, you may receive a "purchase not available" response if you request to purchase a quantity greater than the remaining stock.

You must initialize it to IAP_Initialize() before calling it.

Declaration

cpp
void IAP_FetchProductsEx(const StovePCFetchProductParam* params, OnFetchProductsExFinished onFinished);

Parameters

NameTypeRequiredDescription
paramsconst StovePCFetchProductParam*YProduct information to retrieve (category ID, page number, page size)
onFinishedOnFetchProductsExFinishedYCallback function that registers the retrieved product information

Returns

None

Callback

cpp
typedef void(__cdecl* OnFetchProductsExFinished)(CallbackResult callbackResult, StovePCProductEx* products, uint32_t productSize);
NameTypeDescription
callbackResultCallbackResultCallback result value
productsStovePCProductEx*StovePCProductEx arrays found
productSizeuint32_tproducts Array size

It runs in the thread that called Base_RunCallback(). It is passed only once per call.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe payment feature has not been initialized. You must first call IAP_Initialize().x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
paramsCallerThis is a standard C++ object created by the caller. There is no need to call a separate deallocation function after the function returns; the destructor automatically cleans up the resources when the object goes out of scope.
Callback callbackResultCallback ScopeThis is a local object passed by value. There is no need to free it separately.
The products array of callbacks and each elementSDKDo not unwrap. The callback will be invalidated once it completes, so you must copy any necessary values within the callback.

Example

cpp
using namespace Stove::PCSDK::IAP;

void __cdecl OnFetchProductsExFinished(CallbackResult callbackResult, StovePCProductEx* products, uint32_t productSize)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
        for (uint32_t i = 0; i < productSize; ++i)
        {
            int16_t availabilityCode = products[i].GetPurchaseAvailabilityCode();
        }
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

// Call
StovePCFetchProductParam params;
params.SetPageNumber(1);
params.SetPageSize(20);

IAP_FetchProductsEx(&params, OnFetchProductsExFinished);

Notes

  • This function is asynchronous, and the result is returned only via the onFinished callback.
  • If you leave the category ID for params blank, the entire product list will be retrieved. If you do not specify a page number, 1 is used as the default; if you do not specify a page size, 20 is used as the default.
  • If you don't need a redeem code, you can use IAP_FetchProducts.

See Also


IAP_FetchShopCategories

Kind Function · Module IAP · Version 3.0.0.4

Description

Retrieves the store categories registered on the Stove platform. The results are passed to the onFinished callback.

You must initialize it to IAP_Initialize() before calling it.

Declaration

cpp
void IAP_FetchShopCategories(OnFetchShopCategoriesFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnFetchShopCategoriesFinishedYCallback function that registers the results of a store category query

Returns

None

Callback

cpp
typedef void(__cdecl* OnFetchShopCategoriesFinished)(CallbackResult callbackResult, StovePCShopCategory* shopCategorys, uint32_t shopCategorySize);
NameTypeDescription
callbackResultCallbackResultCallback result value
shopCategorysStovePCShopCategory*StovePCShopCategory arrays retrieved
shopCategorySizeuint32_tshopCategorys Array size

It runs on the thread that called Base_RunCallback(). It is passed only once per call.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe payment functionality has not been initialized. You must first call IAP_Initialize().x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
Callback callbackResultCallback ScopeThis is a local object passed by value. You do not need to free it separately.
The shopCategorys array of callbacks and each elementSDKDo not unwrap. This will be invalidated once the callback completes, so you must copy any necessary values within the callback.

Example

cpp
using namespace Stove::PCSDK::IAP;

void __cdecl OnFetchShopCategoriesFinished(CallbackResult callbackResult, StovePCShopCategory* shopCategorys, uint32_t shopCategorySize)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
        for (uint32_t i = 0; i < shopCategorySize; ++i)
        {
            const wchar_t* categoryId = shopCategorys[i].GetCategoryId();
        }
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

// Call
IAP_FetchShopCategories(OnFetchShopCategoriesFinished);

Notes

  • This function is asynchronous, and the result is returned only via the onFinished callback.
  • The retrieved CategoryId can be used as a category filter when calling IAP_FetchProducts.

See Also


IAP_FetchTermsAgreement

Kind Function · Module IAP · Version 3.0.0.4

Description

This checks whether the user has agreed to the mandatory terms and conditions. If the user has not agreed, you must open the terms and conditions agreement page via the URL included in the results to obtain their consent. The procedure varies depending on the value of StovePCTermsOperation set in options.

  • DEFAULT: Do not use Stove Webview. You must open the terms and conditions page directly using the one-time URL included in the results.
  • WITH_WEBVIEW: Open the Terms and Conditions agreement page via Stove Webview and proceed.

You must initialize it to IAP_Initialize() before calling it.

Declaration

cpp
void IAP_FetchTermsAgreement(const StovePCTermsOption* options, OnFetchTermsAgreementFinished onFinished);

Parameters

NameTypeRequiredDescription
optionsconst StovePCTermsOption*YA struct for passing options to the API
onFinishedOnFetchTermsAgreementFinishedYCallback function that registers information regarding consent to mandatory terms and conditions

Returns

None

Callback

cpp
typedef void(__cdecl* OnFetchTermsAgreementFinished)(CallbackResult callbackResult, bool agreed, const wchar_t* url);
NameTypeDescription
callbackResultCallbackResultCallback result value
agreedboolAcceptance of the Terms of Service
urlconst wchar_t*Terms of Service URL (leave blank if agreed == true)

It runs in the thread that called Base_RunCallback(). It is passed only once per call.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe payment functionality has not been initialized. You must first call IAP_Initialize().x
80VIEWUI_NOT_INITIALIZEDThe terms agreement screen must be opened, but the internal UI module is not initialized.x
82WEBVIEW_CREATE_FAILFailed to generate the terms and conditions agreement screen.x
83WEBVIEW_LOAD_URL_FAILThe URL for the Terms and Conditions agreement screen could not be loaded.x
87WEBVIEW_CREATE_COOKIE_FAILThe host address for 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_FAILThe existing pop-up could not be closed before opening the terms agreement screen.x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
optionsCallerThis is a regular C++ object created by the caller. There is no need to call a separate deallocation function after the function returns; the destructor automatically cleans up the resources when the object goes out of scope.
Callback callbackResult, urlSDKDo not unwrap. It will be invalidated once the callback completes, so you must copy any necessary values within the callback.

Example

cpp
using namespace Stove::PCSDK::IAP;

void __cdecl OnFetchTermsAgreementFinished(CallbackResult callbackResult, bool agreed, const wchar_t* url)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
        if (!agreed)
        {
            // You must open the terms and conditions agreement page via the URL.
        }
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

// Call
StovePCTermsOption options;
options.SetOperation(StovePCTermsOperation::DEFAULT);

IAP_FetchTermsAgreement(&options, OnFetchTermsAgreementFinished);

Notes

  • This function is asynchronous, and the result is returned only via the onFinished callback.
  • If you need the result at the moment the pop-up closes, use IAP_FetchTermsAgreementEx.

See Also


IAP_FetchTermsAgreementEx

Kind Function · Module IAP · Version 3.3.4

Description

Checks whether the user has agreed to the mandatory terms and conditions. The process is the same as IAP_FetchTermsAgreement and depends on the value of StovePCTermsOperation in options.

The difference from IAP_FetchTermsAgreement() is that it receives an additional onDestroy callback. onDestroy is passed after all popups opened by this call have been closed.

You must initialize it to IAP_Initialize() before calling it.

Declaration

cpp
void IAP_FetchTermsAgreementEx(const StovePCTermsOption* options, OnFetchTermsAgreementFinished onFinished, OnIAPPopupDestroyFinished onDestroy);

Parameters

NameTypeRequiredDescription
optionsconst StovePCTermsOption*YA structure for passing options to the API
onFinishedOnFetchTermsAgreementFinishedYCallback function that registers information regarding consent to mandatory terms and conditions
onDestroyOnIAPPopupDestroyFinishedYA callback function that receives the result when the popup closes

Returns

None

Callback

cpp
typedef void(__cdecl* OnFetchTermsAgreementFinished)(CallbackResult callbackResult, bool agreed, const wchar_t* url);

typedef void(__cdecl* OnIAPPopupDestroyFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultCall Results
agreedboolAcceptance of the Terms of Service
urlconst wchar_t*Terms of Service URL (leave blank if agreed == true)

It runs in the thread that called Base_RunCallback().

  • onFinished is passed only once per call.
  • onDestroy is passed after all pop-ups created by this call have been closed.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe payment feature has not been initialized. You must first call IAP_Initialize().x
80VIEWUI_NOT_INITIALIZEDThe terms agreement screen must be opened, but the internal UI module is not initialized.x
82WEBVIEW_CREATE_FAILFailed to generate the Terms and Conditions consent screen.x
83WEBVIEW_LOAD_URL_FAILThe URL for the Terms and Conditions agreement screen could not be loaded.x
87WEBVIEW_CREATE_COOKIE_FAILThe host address for the Terms of Service 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_FAILThe existing pop-up could not be closed before opening the terms agreement screen.x
90WEBVIEW_CLOSE_FAILAn error occurred while closing the Terms of Service agreement screen. The error is being passed to the onDestroy callback.x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
optionsCallerThis is a standard C++ object created by the caller. There is no need to call a separate deallocation function after the function returns; the destructor automatically cleans up the resources when the object goes out of scope.
Callback callbackResult, urlSDKDo not unwrap. It will be invalidated once the callback ends, so you must copy any necessary values within the callback.

Example

cpp
using namespace Stove::PCSDK::IAP;

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

void __cdecl OnFetchTermsAgreementPopupDestroyed(CallbackResult callbackResult)
{
    // Please implement logic that ensures all pop-ups opened during the terms and conditions agreement process are closed.
}

// Call
StovePCTermsOption options;
options.SetOperation(StovePCTermsOperation::WITH_WEBVIEW);

IAP_FetchTermsAgreementEx(&options, OnFetchTermsAgreementFinished, OnFetchTermsAgreementPopupDestroyed);

Notes

  • This function is asynchronous, and the result is passed to the onFinished callback.
  • onDestroy If you don't need a callback, you can use IAP_FetchTermsAgreement.

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 will continue to be available only in the existing interface.

Retrieves a list of purchase records for which the current user has processed refunds. The results are returned via the onFinished callback.

You must initialize it to IAP_Initialize() before calling it.

Declaration

cpp
void IAP_FetchVoidedPurchases(OnFetchVoidedPurchasesFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnFetchVoidedPurchasesFinishedYA callback function that registers information about the list of purchase records for which the current user has processed a refund

Returns

None

Callback

cpp
typedef void(__cdecl* OnFetchVoidedPurchasesFinished)(CallbackResult callbackResult, StovePCVoidedPurchase* voidedPurchases, uint32_t voidedPurchaseSize);
NameTypeDescription
callbackResultCallbackResultCallback result value
voidedPurchasesStovePCVoidedPurchase*Refund Processing Information StovePCVoidedPurchase Array
voidedPurchaseSizeuint32_tvoidedPurchases Array size

It runs on the thread that called Base_RunCallback(). It is passed only once per call.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe payment functionality has not been initialized. You must first call IAP_Initialize().x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
Callback callbackResultCallback ScopeThis is a local object passed by value. You do not need to free it separately.
The voidedPurchases array of callbacks and each elementSDKDo not unwrap. It will be invalidated once the callback finishes, so you must copy any necessary values within the callback.

Example

cpp
using namespace Stove::PCSDK::IAP;

void __cdecl OnFetchVoidedPurchasesFinished(CallbackResult callbackResult, StovePCVoidedPurchase* voidedPurchases, uint32_t voidedPurchaseSize)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
        for (uint32_t i = 0; i < voidedPurchaseSize; ++i)
        {
            int64_t tid = voidedPurchases[i].GetTid();
        }
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

// Call
IAP_FetchVoidedPurchases(OnFetchVoidedPurchasesFinished);

Notes

  • This function is asynchronous, and the result is returned only via the onFinished callback.
  • The IAP_FetchVoidedPurchasesEx function, which retrieves data by specifying a market, is not currently supported by the SDK.

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.

Displays a list of purchase records for which the user has requested a refund.

There are two differences from IAP_FetchVoidedPurchases(). It accepts the marketType parameter, which specifies the market to query using the value StovePCVoidedPurchasesMarketType, and the data type of the items passed to the callback is StovePCVoidedPurchasesEx—which includes market-related fields (such as market code and market order number)—instead of StovePCVoidedPurchase.

You must initialize it to IAP_Initialize() before calling it.

Declaration

cpp
void IAP_FetchVoidedPurchasesEx(StovePCVoidedPurchasesMarketType marketType, OnFetchVoidedPurchasesExFinished onFinished);

Parameters

NameTypeRequiredDescription
marketTypeStovePCVoidedPurchasesMarketTypeYMarket Type to Query
onFinishedOnFetchVoidedPurchasesExFinishedYA callback function that registers a list of purchase records for which the current user has processed a refund

Returns

None

Callback

cpp
typedef void(__cdecl* OnFetchVoidedPurchasesExFinished)(CallbackResult callbackResult, StovePCVoidedPurchasesEx* voidedPurchasesEx, uint32_t voidedPurchaseSize);
NameTypeDescription
callbackResultCallbackResultCallback result value
voidedPurchasesExStovePCVoidedPurchasesEx*Refund Processing Information StovePCVoidedPurchasesEx Array
voidedPurchaseSizeuint32_tvoidedPurchasesEx Array size

It runs in the thread that called Base_RunCallback(). It is passed only once per call.

Error Codes

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

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
Callback callbackResultCallback ScopeThis is a local object passed by value. It does not need to be released separately.
The voidedPurchasesEx array of callbacks and each of its elementsSDKDo not unwrap. This will be invalidated once the callback completes, so you must copy the necessary values within the callback.

Example

cpp
using namespace Stove::PCSDK::IAP;

void __cdecl OnFetchVoidedPurchasesExFinished(CallbackResult callbackResult, StovePCVoidedPurchasesEx* voidedPurchasesEx, uint32_t voidedPurchaseSize)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
        for (uint32_t i = 0; i < voidedPurchaseSize; ++i)
        {
            int64_t tid = voidedPurchasesEx[i].GetTid();
        }
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

// Calls (Search STEAM Market Only)
IAP_FetchVoidedPurchasesEx(StovePCVoidedPurchasesMarketType::STEAM, OnFetchVoidedPurchasesExFinished);

Notes

  • This function is asynchronous, and the result is returned only via the onFinished callback.
  • To view results regardless of market category, you can use IAP_FetchVoidedPurchases.

See Also


IAP_GetVersion

Kind Function · Module IAP · Version 3.4.1

Description

Retrieves version information for the payment feature.

Declaration

cpp
Result IAP_GetVersion(__out wchar_t* version, uint32_t length);

Parameters

NameTypeRequiredDescription
versionwchar_t* (out)YBuffer to receive version information
lengthuint32_tYThe length of the version array

Returns

TypeDescription
ResultFunction call result. Success is determined by result.IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
251PCSDK_DLL_NOT_FOUNDThe path to the SDK DLL file cannot be found.x
253UNMANAGED_EXCEPTIONAn unexpected exception occurred within the SDK.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn unexpected exception occurred within the SDK.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
versionCallerThis buffer was allocated by the caller. It does not need to be freed separately.

Example

cpp
using namespace Stove::PCSDK::IAP;

wchar_t version[64] = { 0 };
Result result = IAP_GetVersion(version, 64);
if (result.IsSuccessful())
{
    // Please implement the logic for the success case. Use `version`.
}
else
{
    // Please implement the logic for when a failure occurs.
}

Notes

  • This function is synchronous and does not accept callbacks.

See Also


IAP_Initialize

Kind Function · Module IAP · Version 3.0.0.4

Description

Resets the payment functionality. This method must be called before any purchase- or payment-related APIs are called.

In the old interface, you must initialize the SDK and the payment functionality separately. You must first initialize the SDK using Base_Initialize() and then call IAP_Initialize(); if Base_Initialize() is not called first, the operation will fail.

Declaration

cpp
Result IAP_Initialize(const wchar_t* shopKey);

Parameters

NameTypeRequiredDescription
shopKeyconst wchar_t*YshopKey issued by a partner

Returns

TypeDescription
ResultFunction call result. Success is determined by result.IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
16BASE_NOT_INITIALIZEDThe SDK has not been initialized. You must first call Base_Initialize().x
18ALREADY_INITIALIZEDIt is already initialized. You must try again after calling IAP_UnInitialize().x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the internal UI module used to display the payment screen.x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::IAP;

Result result = IAP_Initialize(L"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

  • This function is synchronous and does not accept callbacks.
  • The old interface requires individual initialization for each module. For each feature you use—such as the SDK or payment—you must call Base_Initialize() and IAP_Initialize() separately. The new interface (Stove_Initialize) initializes the SDK, pop-up, and payment features all at once with a single call, depending on the initParam setting.
  • If you need an internal window handle, use IAP_InitializeWithWndInfo instead of this function.

See Also


IAP_InitializeWithWndInfo

Kind Function · Module IAP · Version 3.3.3

Description

Resets the payment functionality. Requires the handle of the main window that will serve as the parent window for the "Internal Style" pop-up.

In the old interface, you must initialize the SDK and the payment functionality separately. You must first initialize the SDK using Base_Initialize() and then call this function.

The difference from IAP_Initialize() is that it also passes the parent window handle of the Internal Style popup (a popup rendered by the SDK itself). If you are not using Internal Style popups, you can use IAP_Initialize instead.

Declaration

cpp
Result IAP_InitializeWithWndInfo(const wchar_t* shopKey, const void* mainWndHandle);

Parameters

NameTypeRequiredDescription
shopKeyconst wchar_t*YshopKey issued by a partner
mainWndHandleconst void*YThe main window handle (HWND) that will serve as the parent window for the Internal Style pop-up

Returns

TypeDescription
ResultFunction call result. Success is determined by result.IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
16BASE_NOT_INITIALIZEDThe SDK has not been initialized. You must first call Base_Initialize().x
18ALREADY_INITIALIZEDIt is already initialized. You must try again after calling IAP_UnInitialize().x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the internal UI module used to display the payment screen.x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::IAP;

Result result = IAP_InitializeWithWndInfo(L"YOUR_SHOP_KEY", hWnd);
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.
  • The old interface requires individual initialization for each module. You must call the initialization function separately for each feature you use, such as the SDK and payment. With the new interface (Stove_Initialize), setting the main window handle in initParam initializes the SDK, pop-up, and payment features all at once with a single call.

See Also


IAP_StartPayment

Kind Function · Module IAP · Version 3.0.0.4 · Deprecated

Description

This feature is deprecated. Please use IAP_StartPurchase instead.

You can initiate a one-time payment by receiving a payment URL or by using WebView2. The process varies depending on the value of StovePCPaymentOperation set in options.

  • DEFAULT: Do not use Stove Webview. You must open the payment page directly using the one-time URL included in the results.
  • WITH_WEBVIEW: Open the payment page via Stove Webview and complete the payment.

You must initialize it to IAP_Initialize() before calling it.

Declaration

cpp
void IAP_StartPayment(const StovePCPaymentOption* options, OnStartPaymentFinished onFinished);

Parameters

NameTypeRequiredDescription
optionsconst StovePCPaymentOption*YA struct for passing options to the API
onFinishedOnStartPaymentFinishedYCallback function that registers information about one-time payments

Returns

None

Callback

cpp
typedef void(__cdecl* OnStartPaymentFinished)(CallbackResult callbackResult, const wchar_t* url);
NameTypeDescription
callbackResultCallbackResultCallback result value
urlconst wchar_t*One-time payment URL

It runs in the thread that called Base_RunCallback(). It is passed only once per call.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe payment functionality has not been initialized. You must first call IAP_Initialize().x
80VIEWUI_NOT_INITIALIZEDThe payment screen must be opened, but the internal UI module is not initialized.x
82WEBVIEW_CREATE_FAILFailed to generate the payment screen.x
83WEBVIEW_LOAD_URL_FAILWe were unable to load the URL for the payment screen.x
89WEBVIEW_CLOSE_ALL_FAILThe existing pop-up could not be closed before opening the new payment screen.x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
optionsCallerThis is a standard C++ object created by the caller. There is no need to call a separate deallocation function after the function returns; the destructor automatically cleans up the resources when the object goes out of scope.
Callback callbackResult, urlSDKDo not unwrap. It will be invalidated once the callback completes, so you must copy any necessary values within the callback.

Example

cpp
using namespace Stove::PCSDK::IAP;

void __cdecl OnStartPaymentFinished(CallbackResult callbackResult, const wchar_t* url)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome. If Operation == DEFAULT, the payment page should open via the URL.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

// Call
StovePCPaymentOption options;
options.SetOperation(StovePCPaymentOperation::DEFAULT);

IAP_StartPayment(&options, OnStartPaymentFinished);

Notes

  • This function is asynchronous, and the result is returned only via the onFinished callback.
  • Unlike IAP_StartPurchase, this API is used to top up the game wallet (one-time payment) and does not require a separate confirmation process.
  • If you need the result at the moment the pop-up closes, use IAP_StartPaymentEx.

See Also


IAP_StartPaymentEx

Kind Function · Module IAP · Version 3.3.4 · Deprecated

Description

This feature is deprecated. Please use IAP_StartPurchaseEx instead.

You can initiate a one-time payment by receiving a payment URL or by using WebView2. The process is the same as IAP_StartPayment and depends on the value of StovePCPaymentOperation in options.

The difference from IAP_StartPayment() is that it receives an additional callback, onDestroy. onDestroy is passed after all pop-ups opened by this call have been closed.

You must initialize it to IAP_Initialize() before calling it.

Declaration

cpp
void IAP_StartPaymentEx(const StovePCPaymentOption* options, OnStartPaymentFinished onFinished, OnIAPPopupDestroyFinished onDestroy);

Parameters

NameTypeRequiredDescription
optionsconst StovePCPaymentOption*YA struct for passing options to the API
onFinishedOnStartPaymentFinishedYCallback function that registers information about one-time payments
onDestroyOnIAPPopupDestroyFinishedYA callback function that receives the result when the pop-up closes

Returns

None

Callback

cpp
typedef void(__cdecl* OnStartPaymentFinished)(CallbackResult callbackResult, const wchar_t* url);

typedef void(__cdecl* OnIAPPopupDestroyFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultCall Results
urlconst wchar_t*One-time payment URL

It runs in the thread that called Base_RunCallback().

  • onFinished is passed only once per call.
  • onDestroy is passed after all pop-ups created by this call have been closed.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe payment feature has not been initialized. You must first call IAP_Initialize().x
80VIEWUI_NOT_INITIALIZEDThe payment screen must be opened, but the internal UI module is not initialized.x
82WEBVIEW_CREATE_FAILFailed to generate the payment screen.x
83WEBVIEW_LOAD_URL_FAILWe were unable to load the URL for the payment screen.x
89WEBVIEW_CLOSE_ALL_FAILThe existing pop-up could not be closed before opening the new payment screen.x
90WEBVIEW_CLOSE_FAILAn error occurred while closing the payment screen. The error code onDestroy is being passed to the callback.x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
optionsCallerThis is a standard C++ object created by the caller. There is no need to call a separate free function after the function returns; the destructor automatically cleans up the resources when the object goes out of scope.
Callback callbackResult, urlSDKDo not unwrap. It will be invalidated once the callback completes, so you must copy any necessary values within the callback.

Example

cpp
using namespace Stove::PCSDK::IAP;

void __cdecl OnStartPaymentFinished(CallbackResult callbackResult, const wchar_t* url)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

void __cdecl OnStartPaymentPopupDestroyed(CallbackResult callbackResult)
{
    // Please implement logic that closes all pop-ups opened during the payment process.
}

// Call
StovePCPaymentOption options;
options.SetOperation(StovePCPaymentOperation::WITH_WEBVIEW);

IAP_StartPaymentEx(&options, OnStartPaymentFinished, OnStartPaymentPopupDestroyed);

Notes

  • This function is asynchronous, and the result is passed to the onFinished callback.
  • onDestroy If you don't need a callback, you can use IAP_StartPayment.

See Also


IAP_StartPurchase

Kind Function · Module IAP · Version 3.0.0.4

Description

You can either receive a payment URL to initiate a product purchase or use WebView2 to start the payment process. The procedure varies depending on the value of StovePCPurchaseOperation set in StovePCPurchaseOption of params.

  • DEFAULT: Stove Webview is not used. You must open the payment page directly using the one-time URL included in the results, and after payment, you must manually call IAP_ConfirmPurchase to check the purchase results.
  • WITH_WEBVIEW: Open the payment page via Stove Webview and complete the payment. Even after the payment is completed within the Webview, you must manually call IAP_ConfirmPurchase.
  • WITH_WEBVIEW_AND_CONFIRM_RESULT (Recommended): Proceed with the payment through Stove Webview; upon successful payment, the SDK automatically calls IAP_ConfirmPurchase and returns the confirmed purchase result to onFinished.

You must initialize it to IAP_Initialize() before calling it.

Declaration

cpp
void IAP_StartPurchase(const StovePCStartPurchaseParam* params, OnStartPurchaseFinished onFinished);

Parameters

NameTypeRequiredDescription
paramsconst StovePCStartPurchaseParam*YList of Items to Purchase and Purchase Options
onFinishedOnStartPurchaseFinishedYCallback function that registers the results of a product purchase

Returns

None

Callback

cpp
typedef void(__cdecl* OnStartPurchaseFinished)(CallbackResult callbackResult, StovePCPurchaseResult purchaseResult);
NameTypeDescription
callbackResultCallbackResultCallback result
purchaseResultStovePCPurchaseResultPurchase Results. The fields that are populated depend on the value of StovePCPurchaseOperation (see Overview).

It runs in the thread that called Base_RunCallback(). It is passed only once per call.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe payment feature has not been initialized. You must first call IAP_Initialize().x
80VIEWUI_NOT_INITIALIZEDThe payment screen must be opened, but the internal UI module is not initialized.x
82WEBVIEW_CREATE_FAILFailed to generate the payment screen.x
83WEBVIEW_LOAD_URL_FAILWe were unable to load the URL for the payment page.x
84WEBVIEW_CLOSED_BEFORE_PURCHASEThe user closed the payment screen before the payment was completed.OYour purchase was not completed successfully. Please try again. [OK]
85PARAMETER_LENGTH_EXCEEDEDserviceTxnNo exceeds 50 characters, or extraData exceeds 500 characters.OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
86INVALID_JSON_STRINGextraData is not a valid JSON format.OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
88INVALID_ORDER_PRODUCT_INFORMATIONThere are items in your order with a quantity of 0 or less, or with a negative sales price.OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
89WEBVIEW_CLOSE_ALL_FAILThe existing pop-up could not be closed before opening the new payment screen.x
252NOT_IMPLEMENTEDAn unsupported operation value has been specified.x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OA temporary problem has occurred. Please try again. [OK]

If you call WITH_WEBVIEW_AND_CONFIRM_RESULT, the purchase will be automatically confirmed after payment is complete; if the purchase confirmation fails, the result code will be returned via onFinished.

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
paramsCallerThis is a standard C++ object created by the caller. There is no need to call a separate deallocation function after the function returns; the destructor automatically cleans up the resources when the object goes out of scope.
Callback callbackResult, purchaseResultCallback ScopeThis is a local object passed by value. There is no need to release it separately; it will be invalidated once the callback ends, so you must copy any necessary values within the callback.

Example

cpp
using namespace Stove::PCSDK::IAP;

void __cdecl OnStartPurchaseFinished(CallbackResult callbackResult, StovePCPurchaseResult purchaseResult)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
        // If Operation == DEFAULT, open the payment page using GetOneTimePaymentUrl(), and
        // After the payment is complete, you must call `IAP_ConfirmPurchase()` to confirm the purchase.
        int64_t transactionMasterNumber = purchaseResult.GetTransactionMasterNumber();
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

// Call
StovePCOrderProduct orderProduct;
orderProduct.SetProductId(productId);
orderProduct.SetSalePrice(salePrice);
orderProduct.SetQuantity(1);

StovePCPurchaseOption purchaseOption;
purchaseOption.SetOperation(StovePCPurchaseOperation::DEFAULT);

StovePCStartPurchaseParam params;
params.CreateOrderProduct(1);
params.SetOrderProduct(0, &orderProduct);
params.SetPurchaseOption(purchaseOption);

IAP_StartPurchase(&params, OnStartPurchaseFinished);

Notes

  • This function is asynchronous, and the result is passed only via the onFinished callback.
  • Purchases that begin with DEFAULT or WITH_WEBVIEW must be finalized by calling IAP_ConfirmPurchase. The SDK automatically handles the finalization for WITH_WEBVIEW_AND_CONFIRM_RESULT.
  • You can use the GetPurchaseProgress() value (PurchaseProgress) of purchaseResult to determine whether to display the payment window directly.
  • If you need the result at the moment the pop-up closes, use IAP_StartPurchaseEx.

See Also


IAP_StartPurchaseEx

Kind Function · Module IAP · Version 3.3.4

Description

You can either receive a payment URL to begin the purchase process or use WebView2 to initiate the payment. The procedure varies depending on the value of StovePCPurchaseOperation in params, just as it does in IAP_StartPurchase.

The difference from IAP_StartPurchase() is that it receives an additional onDestroy callback. onDestroy is passed after all pop-ups opened by this call have been closed.

You must initialize it to IAP_Initialize() before calling it.

Declaration

cpp
void IAP_StartPurchaseEx(const StovePCStartPurchaseParam* params,
                         OnStartPurchaseFinished onFinished, OnIAPPopupDestroyFinished onDestroy);

Parameters

NameTypeRequiredDescription
paramsconst StovePCStartPurchaseParam*YList of Items to Purchase and Purchase Options
onFinishedOnStartPurchaseFinishedYCallback function that registers the results of a product purchase
onDestroyOnIAPPopupDestroyFinishedYA callback function that receives the result when the popup closes

Returns

None

Callback

cpp
typedef void(__cdecl* OnStartPurchaseFinished)(CallbackResult callbackResult, StovePCPurchaseResult purchaseResult);

typedef void(__cdecl* OnIAPPopupDestroyFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultCall Results
purchaseResultStovePCPurchaseResultPurchase Results. The fields that are populated vary depending on the value of StovePCPurchaseOperation.

It runs in the thread that called Base_RunCallback().

  • onFinished is passed only once per call.
  • onDestroy is passed after all pop-ups created by this call have been closed.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe payment feature has not been initialized. You must first call IAP_Initialize().x
80VIEWUI_NOT_INITIALIZEDThe payment screen must be opened, but the internal UI module is not initialized.x
82WEBVIEW_CREATE_FAILFailed to generate the payment screen.x
83WEBVIEW_LOAD_URL_FAILWe were unable to load the URL for the payment screen.x
84WEBVIEW_CLOSED_BEFORE_PURCHASEThe user closed the payment screen before the payment was completed.OYour purchase was not completed successfully. Please try again. [OK]
85PARAMETER_LENGTH_EXCEEDEDserviceTxnNo exceeds 50 characters, or extraData exceeds 500 characters.OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
86INVALID_JSON_STRINGextraData is not in valid JSON format.OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
88INVALID_ORDER_PRODUCT_INFORMATIONThere are items in your order with a quantity of 0 or less, or with a negative price.OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
89WEBVIEW_CLOSE_ALL_FAILThe existing pop-up could not be closed before opening the new payment screen.x
90WEBVIEW_CLOSE_FAILAn error occurred while closing the payment screen. The error is being passed to the onDestroy callback.x
252NOT_IMPLEMENTEDAn unsupported operation value has been specified.x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OThere was a temporary issue. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OThere was a temporary issue. Please try again. [OK]

If you call WITH_WEBVIEW_AND_CONFIRM_RESULT, the purchase will be automatically confirmed after payment is complete; if the purchase confirmation fails, the result code will be returned as onFinished.

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
paramsCallerThis is a standard C++ object created by the caller. There is no need to call a separate deallocation function after the function returns; the destructor automatically cleans up the resources when the object goes out of scope.
Callback callbackResult, purchaseResultCallback ScopeThis is a local object passed by value. There is no need to manually free it; it will be invalidated once the callback finishes, so you must copy any necessary values within the callback.

Example

cpp
using namespace Stove::PCSDK::IAP;

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

void __cdecl OnStartPurchasePopupDestroyed(CallbackResult callbackResult)
{
    // Please implement logic that closes all pop-ups opened during the purchase process.
}

// Call
StovePCOrderProduct orderProduct;
orderProduct.SetProductId(productId);
orderProduct.SetSalePrice(salePrice);
orderProduct.SetQuantity(1);

StovePCPurchaseOption purchaseOption;
purchaseOption.SetOperation(StovePCPurchaseOperation::WITH_WEBVIEW_AND_CONFIRM_RESULT);

StovePCStartPurchaseParam params;
params.CreateOrderProduct(1);
params.SetOrderProduct(0, &orderProduct);
params.SetPurchaseOption(purchaseOption);

IAP_StartPurchaseEx(&params, OnStartPurchaseFinished, OnStartPurchasePopupDestroyed);

Notes

  • This function is asynchronous, and the result is passed to the onFinished callback.
  • Purchases that begin with DEFAULT or WITH_WEBVIEW must be confirmed by calling IAP_ConfirmPurchase. The SDK automatically handles the confirmation for WITH_WEBVIEW_AND_CONFIRM_RESULT.
  • onDestroy If you don't need a callback, you can use IAP_StartPurchase.

See Also


IAP_UnInitialize

Kind Function · Module IAP · Version 3.0.0.4

Description

Releases resources associated with the payment feature. Call this method when you need to exit the game or Initialize the payment feature.

Declaration

cpp
Result IAP_UnInitialize();

Parameters

None

Returns

TypeDescription
ResultFunction call result. Success is determined by result.IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe payment functionality has not been initialized. You must first call IAP_Initialize().x
81VIEWUI_UNINIT_FAILEDFailed to clean up the internal UI module.x
253UNMANAGED_EXCEPTIONAn unknown exception occurred during processing.OA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during processing.OA temporary problem has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Example

cpp
using namespace 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 a failure occurs.
}

Notes

  • This function is synchronous and does not accept callbacks.
  • The legacy interface requires each module to be terminated individually. You must call the UnInitialize function for each module you have used.

See Also


Log_GetVersion

Kind Function · Module Log · Version 3.4.1

Description

Fills the version buffer with version information from the log function and returns it.

Declaration

cpp
Result Log_GetVersion(__out wchar_t* version, uint32_t length);

Parameters

NameTypeRequiredDescription
versionwchar_t*YThis is the buffer that will receive the version information. It is allocated by the caller.
lengthuint32_tYversion is the length of the buffer.

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() is equal to true, the call was successful.

Error Codes

This function returns the version information retrieved from the BaseSDK as-is. There is no result code specific to Log.

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
version BufferCallerSince the buffer was allocated by the caller, the caller manages it.

Example

cpp
using namespace Stove::PCSDK::Log;

wchar_t version[64] = { 0 };
Result result = Log_GetVersion(version, 64);

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

Notes

  • version The buffer must be greater than or equal to length; otherwise, the operation may fail.

See Also


Log_Initialize

Kind Function · Module Log · Version 3.4.1

Description

Resets the logging feature. The logging feature was added in its entirety in version 3.4.1, according to the release notes.

The SDK must be initialized first, and duplicate initialization is not allowed.

Declaration

cpp
Result Log_Initialize();

Parameters

None

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() equals true, the call was successful.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::Log::SDKMethod::INITIALIZE.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSIt worked.x
16BASE_NOT_INITIALIZEDThe SDK has not been initialized. You must first call Base_Initialize().x
18ALREADY_INITIALIZEDIt is already initialized.x
80LOCAL_DB_CREATE_WORKING_DIRECTORY_FAILEDUnable to create the local working directory to store the logs.x
81LOCAL_DB_CONNECT_FAILEDUnable to connect to the local database where logs are stored.x
82LOCAL_DB_CREATE_TABLE_FAILEDUnable to create the local database table to store the logs.x
251PCSDK_DLL_NOT_FOUNDThis is returned if the internal version check performed during the initialization process fails.x
253UNMANAGED_EXCEPTIONAn unknown exception occurred within the SDK.OThere was a temporary issue. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the SDK.OThere was a temporary issue. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::Log;

Result result = Log_Initialize();

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

Notes

  • When you are finished using it, call Log_UnInitialize to release the resource.
  • If you call this method before the SDK has been initialized, BASE_NOT_INITIALIZED may be returned.

See Also


Log_Send

Kind Function · Module Log · Version 3.4.1

Description

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

Declaration

cpp
void Log_Send(const StovePCLogSendParam* logSendParam, OnLogSendFinished onFinished);

Parameters

NameTypeRequiredDescription
logSendParamconst StovePCLogSendParam*YThis information is for sending logs.
onFinishedOnLogSendFinishedYThis is a callback function that receives the log transmission results.

Returns

None

Callback

cpp
typedef void(__cdecl* OnLogSendFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.

The callback runs in the thread that called Base_RunCallback(). It is called once when the transmission is complete.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::Log::SDKMethod::LOG_SEND.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSThe log has been successfully recorded in the local database.x
17NOT_INITIALIZEDThis function was called before the log was initialized.x
84LOCAL_DB_BACKUP_LOG_FAILEDFailed to write the log to the local database.x
85INVALID_LOG_PARAMETERlogSendParam.contents is not in the correct JSON format.x
86LOG_SIZE_EXCEEDEDThe log entry exceeds the maximum allowed size (50 KB).x
253UNMANAGED_EXCEPTIONAn unknown exception occurred within the SDK.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the SDK.OThere was a temporary issue. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
logSendParamCallerThis is a standard C++ object created by the caller. There is no need to call a separate deallocation function after the function returns; the destructor automatically cleans up the resources when the object goes out of scope.
Callback callbackResultSDKDo not unwrap. The callback will be invalidated once it completes, so you must copy any necessary values within the callback.

Example

cpp
using namespace Stove::PCSDK::Log;

StovePCLogSendParam logSendParam;
logSendParam.SetAuid(auid);
logSendParam.SetCuid(cuid);
logSendParam.SetContents(L"{\"event\":\"login\"}");

Log_Send(&logSendParam, [](CallbackResult callbackResult)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for the success case.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

  • You do not need to configure fields for which you do not know the values. For field descriptions, see StovePCLogSendParam.
  • The logging feature provides only one logging API: Log_Send().
  • The callback for Log_Send() is invoked by SUCCESS as soon as the log is written to the local database. Whether the transmission to the actual log server was successful is not passed to this callback.
  • Except for local DB write failures (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 is the counterpart to Log_Initialize.

Declaration

cpp
Result Log_UnInitialize();

Parameters

None

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() is equal to true, the call was successful.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::Log::SDKMethod::UNINITIALIZE.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSIt worked.x
17NOT_INITIALIZEDThis function was called before the log function was initialized.x
83LOCAL_DB_DISCONNECT_FAILEDFailed to disconnect from the local database.x
253UNMANAGED_EXCEPTIONAn unknown exception occurred within the SDK.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred within the SDK.OThere was a temporary issue. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::Log;

Result result = Log_UnInitialize();

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

Notes

See Also


PCBang_CheckPCBangStatus

Kind Function · Module PCBang · Version 3.0.2

Description

Checks whether the amount is PC Bang and the product's usage status.

Declaration

cpp
void PCBang_CheckPCBangStatus(OnPCBangCheckPCBangStatusOnFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnPCBangCheckPCBangStatusOnFinishedYThis is the callback function that receives the query results.

Returns

None

Callback

cpp
typedef void(__cdecl* OnPCBangCheckPCBangStatusOnFinished)(CallbackResult callbackResult, StovePCBangStatus pcBangStatus);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.
pcBangStatusStovePCBangStatusThis information pertains to the PC Bang status and the product's condition.

The callback runs in the thread that called Base_RunCallback(). It is called once when the lookup is complete.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::PCBang::SDKMethod::CHECK_PCBANG_STATUS.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe SDK or the PC Bang function has not been initialized. You must call PCBang_Initialize() first.x
22HTTP_ERRORThe network communication for the status query request failed.OThe network connection is unstable. Please check your network status and try again. [OK]
23RESPONSE_ERRORThe server response 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]
249NETWORK_TRANSPORT_ERRORAn error occurred during network transmission.x
253UNMANAGED_EXCEPTIONAn unexpected exception occurred within the SDK.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn unexpected exception occurred within the SDK.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
Callback callbackResultCallback ScopeThis is a local object passed by value. You do not need to free it separately.
Callback pcBangStatus (StovePCBangStatus)Callback ScopeSince it is passed by value, there is no need to release it. However, since the const wchar_t* returned by the getter points to the object's internal buffer, you must copy the string inside the callback if you plan to use it outside the callback.

Example

cpp
using namespace Stove::PCSDK::PCBang;

PCBang_CheckPCBangStatus([](CallbackResult callbackResult, StovePCBangStatus pcBangStatus)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        PCBangPremium premiumStatus = pcBangStatus.GetPremiumStatus();

        // Please implement the logic for the success case.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

See Also


PCBang_GetVersion

Kind Function · Module PCBang · Version 3.4.1

Description

Fills the version buffer with version information for the PC Bang function and returns it.

Declaration

cpp
Result PCBang_GetVersion(__out wchar_t* version, uint32_t length);

Parameters

NameTypeRequiredDescription
versionwchar_t*YThis is the buffer that will receive the version information. It is allocated by the caller.
lengthuint32_tYversion is the length of the buffer.

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() is equal to true, the call was successful.

Error Codes

This function returns the version information from the BaseSDK as-is. There is no PCBang-specific return code.

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
version BufferCallerSince the caller allocated the buffer, the caller manages it.

Example

cpp
using namespace Stove::PCSDK::PCBang;

wchar_t version[64] = { 0 };
Result result = PCBang_GetVersion(version, 64);

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

Notes

  • version The buffer must be greater than or equal to length; if it is insufficient, the operation may fail.
  • This function was added in version 3.4.1, according to the release notes.

See Also


PCBang_Initialize

Kind Function · Module PCBang · Version 3.0.2

Description

Initializes the PC Bang function.

The SDK must be initialized first, and duplicate initialization is not allowed.

Declaration

cpp
Result PCBang_Initialize();

Parameters

None

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() is equal to true, the call was successful.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::PCBang::SDKMethod::INITIALIZE.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
16BASE_NOT_INITIALIZEDThe SDK has not been initialized. You must first call Base_Initialize().x
18ALREADY_INITIALIZEDIt is already initialized. You must try again after calling PCBang_UnInitialize().x
251PCSDK_DLL_NOT_FOUNDThe initialization process did not complete because the internal version check failed.x
253UNMANAGED_EXCEPTIONAn unexpected exception occurred within the SDK.OThere was a temporary issue. Please try again. [OK]
254MANAGED_EXCEPTIONAn unexpected exception occurred within the SDK.OA temporary problem has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::PCBang;

Result result = PCBang_Initialize();

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

Notes

  • When you are finished using it, call PCBang_UnInitialize to release the resource.
  • If you call this method before the SDK has been initialized, BASE_NOT_INITIALIZED may be returned.

See Also


PCBang_UnInitialize

Kind Function · Module PCBang · Version 3.0.2

Description

PC Bang Releases the resources associated with the function. This function is the counterpart to PCBang_Initialize.

Declaration

cpp
Result PCBang_UnInitialize();

Parameters

None

Returns

TypeDescription
ResultHere are the results of the function call. If result.IsSuccessful() is equal to true, the call was successful.

Error Codes

If you look up Result::GetMethodCode(), you'll get the value Stove::PCSDK::PCBang::SDKMethod::UNINITIALIZE.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDIt is not yet initialized or has already been shut down.x
253UNMANAGED_EXCEPTIONAn unexpected exception occurred within the SDK.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn unexpected exception occurred within the SDK.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Example

cpp
using namespace 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 an error occurs.
}

Notes

See Also


PCBang_UserLogin

Kind Function · Module PCBang · Version 3.0.2

Description

The PC Bang service logs in the game user. It passes both a callback to receive the login result and a callback to receive benefit information updated every 4 minutes.

Declaration

cpp
void PCBang_UserLogin(OnPCBangUserLoginOnFinished onUserLoginFinished, OnPCBangRefreshUserBenefitsOnFinished onRefreshBenefitsFinished);

Parameters

NameTypeRequiredDescription
onUserLoginFinishedOnPCBangUserLoginOnFinishedYThis is the callback function that receives the login result.
onRefreshBenefitsFinishedOnPCBangRefreshUserBenefitsOnFinishedYThis is a callback function that receives user benefit information updated every 4 minutes.

Returns

None

Callback

Login Result Callback — onUserLoginFinished

cpp
typedef void(__cdecl* OnPCBangUserLoginOnFinished)(CallbackResult callbackResult, StovePCBangUserLogin userLogin);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.
userLoginStovePCBangUserLoginHere is the login result information.

The callback runs in the thread that called Base_RunCallback(). It is called once after the login process is complete.

Benefits Refresh Callback — onRefreshBenefitsFinished

cpp
typedef void(__cdecl* OnPCBangRefreshUserBenefitsOnFinished)(CallbackResult callbackResult, StovePCRefreshUserBenefits refreshUserBenefits);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.
refreshUserBenefitsStovePCRefreshUserBenefitsHere is the updated information on user benefits.

The callback runs in the thread that called Base_RunCallback(). It is called repeatedly to deliver user benefit information that is updated every 4 minutes.

Error Codes

If you make a query using Result::GetMethodCode(), the login result callback will return the value Stove::PCSDK::PCBang::SDKMethod::USER_LOGIN, and the benefit renewal callback will return the value Stove::PCSDK::PCBang::SDKMethod::REFRESH_USER_BENEFITS.

Login result callback (onUserLoginFinished)

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe SDK or the PC Bang feature has not been initialized. You must call PCBang_Initialize() first.x
22HTTP_ERRORThe network communication for the login request failed.OThe network connection is unstable. Please check your network status and try again. [OK]
23RESPONSE_ERRORThe server response is invalid.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 value is incorrect.OThe network connection is unstable. Please check your network status and try again. [OK]
249NETWORK_TRANSPORT_ERRORAn error occurred during network transmission.x
253UNMANAGED_EXCEPTIONAn unexpected exception occurred within the SDK.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn unexpected exception occurred within the SDK.OA temporary issue has occurred. Please try again. [OK]

Benefits Refresh Callback (onRefreshBenefitsFinished)

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe SDK or PC Bang feature has not been initialized.x
22HTTP_ERRORThe network communication for the benefit renewal request failed.OThe network connection is unstable. Please check your network status and try again. [OK]
23RESPONSE_ERRORThe server response is invalid.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 value is incorrect.OThe network connection is unstable. Please check your network status and try again. [OK]
249NETWORK_TRANSPORT_ERRORAn error occurred during network transmission.x
253UNMANAGED_EXCEPTIONAn unexpected exception occurred within the SDK.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn unexpected exception occurred within the SDK.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Memory Management

ObjectOwnerRelease
Callback callbackResultCallback ScopeThis is a local object passed by value. You do not need to free it separately.
Callback userLogin (StovePCBangUserLogin)Callback ScopeSince it is passed by value, there is no need to release it. However, since the const wchar_t* returned by the getter points to the object's internal buffer, you must copy the string inside the callback if you plan to use it outside the callback.
Callback refreshUserBenefits (StovePCRefreshUserBenefits)Callback ScopeSince it is passed by value, there is no need to release it. However, since the const wchar_t* returned by the getter points to the object's internal buffer, you must copy the string inside the callback if you plan to use it outside the callback.

Example

cpp
using namespace Stove::PCSDK::PCBang;

PCBang_UserLogin(
    [](CallbackResult callbackResult, StovePCBangUserLogin userLogin)
    {
        if (callbackResult.GetResult().IsSuccessful())
        {
            // Please implement the logic for a successful outcome.
        }
        else
        {
            // Please implement the logic for when an error occurs.
        }
    },
    [](CallbackResult callbackResult, StovePCRefreshUserBenefits refreshUserBenefits)
    {
        if (callbackResult.GetResult().IsSuccessful())
        {
            // Please implement the logic to reflect the updated benefit information.
        }
        else
        {
            // Please implement the logic for when an error occurs.
        }
    });

Notes

See Also


PCBang_UserLogout

Kind Function · Module PCBang · Version 3.0.2

Description

Log out the game user from the PC Bang service.

Declaration

cpp
void PCBang_UserLogout(OnPCBangUserLogoutOnFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnPCBangUserLogoutOnFinishedYThis is the callback function that receives the logout result.

Returns

None

Callback

cpp
typedef void(__cdecl* OnPCBangUserLogoutOnFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultThis is the callback result.

The callback runs in the thread that called Base_RunCallback(). It is called once after the logout process is complete.

Error Codes

If you look up Result::GetMethodCode(), you get the value Stove::PCSDK::PCBang::SDKMethod::USER_LOGOUT.

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe SDK or the PC Bang feature has not been initialized. You must call PCBang_Initialize() first.x
22HTTP_ERRORThe network communication for the logout request failed.OThe network connection is not working properly. Please check your network status and try again. [OK]
23RESPONSE_ERRORThe server response is invalid.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]
249NETWORK_TRANSPORT_ERRORAn error occurred during network transmission.x
253UNMANAGED_EXCEPTIONAn unexpected exception occurred within the SDK.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn unexpected exception occurred within the SDK.OA temporary issue has occurred. Please try again. [OK]

For other possible error codes, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::PCBang;

PCBang_UserLogout([](CallbackResult callbackResult)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
});

Notes

See Also


PCBangPremium

Kind Enum · Module PCBang · Version 3.0.0.4

Description

This is an enumeration that identifies the PC Bang premium. It is used as the value for the user benefit code fields StovePCBangUserLogin, StovePCBangStatus, and StovePCRefreshUserBenefits.

This value is distinct from SDKResultCode. PCBANG_ERROR indicates a query failure, while the remaining values indicate the franchise status PC Bang.

Declaration

cpp
enum class PCBangPremium : int32_t
{
    PCBANG_ERROR = -1,
    PCBANG_PREMIUM = 1,
    PCBANG_FREE = 2,
    PCBANG_FREE_OTHER = 3,
};

Enum Values

CodeNameDescription
-1PCBANG_ERRORError
(0)Not used (Skip)
1PCBANG_PREMIUMPremium
2PCBANG_FREEFree Franchise
3PCBANG_FREE_OTHERFree Franchise for Homes (excluding internet cafes)

Example

cpp
using namespace Stove::PCSDK::PCBang;

void __cdecl OnCheckPCBangStatusFinished(CallbackResult callbackResult, StovePCBangStatus pcBangStatus)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        if (pcBangStatus.GetPremiumStatus() == PCBangPremium::PCBANG_FREE)
        {
            // Please implement the logic for the "PCBANG_FREE" state.
        }
    }
}

Notes

  • Even when in PCBANG_FREE (Free Membership) status, the PCBang_UserLogin() benefit renewal callback continues to be triggered.
  • PCBANG_ERROR is a value that indicates a query failure; it is distinct from the result code (SDKResultCode).

See Also


ProductTypeCode

Kind Enum · Module IAP · Version 3.0.0.4

Description

Indicates the item type of the product. You can verify this by checking the GetProductTypeCode() of StovePCProduct / StovePCProductEx passed to the IAP_FetchProducts / IAP_FetchProductsEx callback.

Declaration

cpp
enum class ProductTypeCode : uint32_t
{
    NONE = 0,
    INDIE_PACKAGE_GAME_ITEM = 1,
    IN_GAME_ITEM = 2,
    PACKAGE_ITEM = 3,
};

Enum Values

CodeNameDescription
0NONENone
1INDIE_PACKAGE_GAME_ITEMIndie Game Package Items
2IN_GAME_ITEMIn-game items
3PACKAGE_ITEMPackage Items

Example

cpp
using namespace Stove::PCSDK::IAP;

if (product.GetProductTypeCode() == ProductTypeCode::IN_GAME_ITEM)
{
    // Please implement the in-game item logic.
}

Notes

  • This value is read only from product search results. It is not used as a request parameter.

See Also


PurchaseLimitTypeCode

Kind Enum · Module IAP · Version 3.0.0.4

Description

This indicates the purchase restriction method for the product. You can verify this by checking the GetPurchaseLimitTypeCode() of StovePCProduct / StovePCProductEx passed to the IAP_FetchProducts / IAP_FetchProductsEx callback.

Declaration

cpp
enum class PurchaseLimitTypeCode : uint32_t
{
    NONE = 0,
    UNLIMITED = 1,
    MEMBER = 2,
    CHARACTER = 3
};

Enum Values

CodeNameDescription
0NONENo restrictions
1UNLIMITEDUnlimited
2MEMBERMember-Specific Limits
3CHARACTERCharacter-Specific Restrictions

Example

cpp
using namespace Stove::PCSDK::IAP;

if (product.GetPurchaseLimitTypeCode() == PurchaseLimitTypeCode::CHARACTER)
{
    int32_t limitCount = product.GetPurchaseLimitCount();
}

Notes

  • When the value is CHARACTER, GetPurchaseLimitCount() refers to the quantity limit per member.

See Also


PurchaseProgress

Kind Enum · Module IAP · Version 3.0.0.4

Description

You can check this by looking at GetPurchaseProgress() of StovePCPurchaseResult, which is passed via the IAP_StartPurchase / IAP_StartPurchaseEx callback. It is used to determine whether the caller must display the payment window directly.

Declaration

cpp
enum class PurchaseProgress : uint32_t
{
    NONE = 0,
    NEED_PAYMENT_WINDOW = 1,
    NOT_NEED_PAYMENT_WINDOW = 2
};

Enum Values

CodeNameDescription
0NONENone
1NEED_PAYMENT_WINDOWNeed to open the payment window using a one-time payment URL
2NOT_NEED_PAYMENT_WINDOWPayment has been completed with a 0 won purchase, or manual URL calls are not required due to the use of WebView

Example

cpp
using namespace Stove::PCSDK::IAP;

if (purchaseResult.GetPurchaseProgress() == PurchaseProgress::NEED_PAYMENT_WINDOW)
{
    // You must open the payment page using `purchaseResult.GetOneTimePaymentUrl()`.
}

Notes

  • If the purchase began with StovePCPurchaseOperation::DEFAULT, this value is checked to determine whether to display the payment screen.

See Also


Result

Kind Struct · Module Base · Version 3.0.0.4

Description

This is a structure that holds the results of synchronous API calls. It contains the name of the SDK that generated the result, the method code, and the result code; you can check whether the call was successful by looking for IsSuccessful().

Result is a common type defined in the Stove::PCSDK namespace. It is not specific to Stove::PCSDK::Base; the synchronous APIs for all other features—such as payment, pop-up, and PC Bang—also use the same Result type as their return value. The values obtained via GetMethodCode() / GetResultCode() correspond to the SDKMethod / SDKResultCode (or common SDKResultCode) values of the module that called that API. These are value types; they can be left on the stack as-is and do not require a separate deallocation call.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        struct Result
        {
        public:
            bool IsSuccessful() const;
            const wchar_t* GetSDKName() const;
            uint32_t GetMethodCode() const;
            uint32_t GetResultCode() const;
        };
    }
}

Members

NameTypeAccessDescription
IsSuccessful()boolReadWhether the API was successful.
GetSDKName()const wchar_t*ReadThis is the name of the SDK that produced these results.
GetMethodCode()uint32_tReadThis is the Method Code value of the function that produced this result.
GetResultCode()uint32_tReadThis is the Result Code value of the function that produced this result.

Example

cpp
using namespace Stove::PCSDK;
using namespace 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 a failure occurs.
}

Notes

  • Base_UnInitialize(), Base_GetUser(), and others are used as return values for synchronous APIs that do not use callbacks. For callback results from asynchronous APIs, use CallbackResult.
  • GetMethodCode() corresponds to the value SDKMethod, and GetResultCode() corresponds to the value SDKResultCode. However, since these two enumerations exist under the same name in each module, you must compare them with the enumeration of the module identified by GetSDKName().

See Also


SDKMethod (Base)

Kind Enum · Module Base · Version 3.0.0.4

Description

This is the code value for the functions used in the SDK. It is the value returned by GetMethodCode() of Result and identifies which API call generated this result.

This document describes Stove::PCSDK::Base::SDKMethod. There is a SDKMethod enumeration with the same name in each module, including BaseSDK, and their values and meanings differ. Since they are distinguished only by their namespace (Stove::PCSDK::<Module>::SDKMethod), you must not mix their values with those from other modules.

The value marked as Internal method in the source is used for internal SDK communication and has been excluded from the table below.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            enum class SDKMethod : uint32_t
            {
                INITIALIZE = 1U,
                UNINITIALIZE = 2U,
                // ... See the "Values" table below
                VIETNAM_OVER_IMMERSION_NOTIFICATION = 80U,
            };
        }
    }
}

Enum Values

CodeNameDescription
1INITIALIZEBase_Initialize
2UNINITIALIZEBase_UnInitialize
5GET_VERSIONBase_GetVersion
6 ~ 63Not used (internal values and reserved ranges)
64GET_ACCESS_TOKENBase_GetAccessToken
65ACCESS_TOKEN_RENEWEDBase_AccessTokenRenewed
66GET_USERBase_GetUser
67SET_LANGUAGEBase_SetLanguage
68OVER_IMMERSION_NOTIFICATIONBase_OverImmersionNotification
69SHUTDOWN_NOTIFICATIONBase_ShutdownNotification
70LOG_ADDBase_LogAdd (Deprecated) — There is no corresponding function in the currently released BaseSDK.h.
71GET_TRACE_HINTBase_GetTraceHint
72SET_GAME_PROFILEBase_SetGameProfile
73GET_GDSBase_GetGds
74GET_SIGNINBase_GetSignin
75RESTART_APP_IF_NECESSARYBase_RestartAppIfNecessary
76RESTART_APP_IF_NECESSARY_ASYNCBase_RestartAppIfNecessaryAsync
77OPEN_EXTERNAL_URLBase_OpenExternalUrl
78GET_CLOUD_SAVING_PATHBase_GetCloudSavingPath — For StoreIndi only
79VIETNAM_AGE_RATING_NOTIFICATIONBase_VietnamAgeRatingNotification
80VIETNAM_OVER_IMMERSION_NOTIFICATIONBase_VietnamOverimmersionNotification
81CLOSE_ALL_POPUPSCloses all open pop-ups. With the integration of IAP and View's pop-up closing into a single binary, this functionality has been moved to the BaseSDK.
82 ~ 95Not in use (reserved section)

Internal-use-only values (INTERNAL_SEND_81PLUG=3, INTERNAL_UPDATE_81PLUG=4, INTERNAL_SEND_AMPLITUDE=6, and the 26 values in the range 96–121) have been excluded from the table above because they are for internal SDK use only.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

Result result = Base_UnInitialize();

if (result.GetMethodCode() == static_cast<uint32_t>(SDKMethod::UNINITIALIZE))
{
    // This is the result of calling Base_UnInitialize.
}

Notes

  • Stove::PCSDK::Base::SDKMethod, and other modules also have their own distinct SDKMethod enumerations. Since the values overlap across modules, you must distinguish between the modules when comparing them.
  • Value 70 (LOG_ADD) currently has no corresponding function in the public header. The code value itself remains for backward compatibility.

See Also


SDKMethod (IAP)

Kind Enum · Module IAP · Version 3.0.0.4

Description

The SDKMethod in this document is Stove::PCSDK::IAP::SDKMethod. While other modules, such as the SDK and pop-ups, also contain enumerations with the same name, they are of different types, so please be careful not to confuse them.

This is the value returned as Result::GetMethodCode() / CallbackResult::GetResult().GetMethodCode(), and it is used to identify which API call the result corresponds to.

Numbers 1 through 5 are used for common payment function operations (initialization and version lookup), while numbers 80 through 89 are used for payment function-specific operations. The numbers in between (6 through 79) are reserved and not used by this function.

Declaration

cpp
enum class SDKMethod : uint32_t
{
    INITIALIZE = 1U,
    // ... See the "Values" table below
    WITHDRAW_GAME = 89U,
};

Enum Values

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

The value 3(INTERNAL_SEND_81PLUG) · 4(INTERNAL_UPDATE_81PLUG) is for internal use only (Deprecated) and is therefore not included in this document.

Ex There are separate codes corresponding to the suffix functions (IAP_FetchProductsEx, IAP_StartPurchaseEx, IAP_FetchTermsAgreementEx, IAP_StartPaymentEx, IAP_FetchVoidedPurchasesEx, IAP_InitializeWithWndInfo) are not defined in the source code. It appears they share the same code as the base type, but there is no explicit evidence of this in the source.

Example

cpp
using namespace Stove::PCSDK::IAP;

Result result = IAP_Initialize(L"YOUR_SHOP_KEY");
if (result.GetMethodCode() == static_cast<uint32_t>(SDKMethod::INITIALIZE))
{
    // These are the results of the IAP_Initialize call.
}

Notes

  • A module with the same name, SDKMethod, also exists in other modules, such as the SDK and pop-ups. This document covers only the SDKMethod for the payment feature.
  • Although the result code (SDKResultCode) appears to overlap with the number range (80–89), they are different enumeration types, so be careful not to confuse them.

See Also


SDKMethod (Log)

Kind Enum · Module Log · Version 3.4.1

Description

This is the method code for the functions used in the log feature. It corresponds to the value retrieved via Result::GetMethodCode() (or CallbackResult.GetResult().GetMethodCode() in the case of a callback), which is the result of the function call.

This document is Stove::PCSDK::Log in the SDKMethod namespace. There is a separate enumeration with the same name in the Stove::PCSDK::PCBang namespace, but its values are different. You can check Result::GetSDKName() to determine which module the values actually belong to.

Declaration

cpp
enum class SDKMethod : uint32_t
{
    INITIALIZE = 1U,
    UNINITIALIZE = 2U,
    // ... See the "Values" table below
    LOG_SEND = 80U
};

Enum Values

CodeNameDescription
1INITIALIZELog_Initialize
2UNINITIALIZELog_UnInitialize
5GET_VERSIONLog_GetVersion
(6–79)Not used (Skip)
80LOG_SENDLog_Send

Internal-use-only values (INTERNAL_SEND_81PLUG=3, INTERNAL_UPDATE_81PLUG=4) are not included in the document.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Log;

Result result = Log_Initialize();

if (result.GetMethodCode() == static_cast<uint32_t>(SDKMethod::INITIALIZE))
{
    // Please implement logic to verify whether this result pertains to a call to Log_Initialize.
}

Notes

  • Stove::PCSDK::PCBang::SDKMethod—Although it has the same name, it is a separate enumeration.

See Also


SDKMethod (PCBang)

Kind Enum · Module PCBang · Version 3.0.0.4

Description

This is the method code for the functions used in the PC Bang feature. It corresponds to the value retrieved via Result::GetMethodCode() (or CallbackResult.GetResult().GetMethodCode() for callbacks), which is the result of the function call.

This document is Stove::PCSDK::PCBang in the SDKMethod namespace. There is a separate enumeration with the same name in the Stove::PCSDK::Log namespace, but its values are different. You can use Result::GetSDKName() to verify which module the value actually belongs to.

Declaration

cpp
enum class SDKMethod : uint32_t
{
    INITIALIZE = 1U,
    UNINITIALIZE = 2U,
    // ... See the "Values" table below
    REFRESH_USER_BENEFITS = 83U,
};

Enum Values

CodeNameDescription
1INITIALIZEPCBang_Initialize
2UNINITIALIZEPCBang_UnInitialize
5GET_VERSIONPCBang_GetVersion
(6–79)Not used (Skip)
80USER_LOGINCallback for the login result of PCBang_UserLogin
81USER_LOGOUTPCBang_UserLogout
82CHECK_PCBANG_STATUSPCBang_CheckPCBangStatus
83REFRESH_USER_BENEFITSBenefit Renewal Callback for PCBang_UserLogin

Internal-use-only values (INTERNAL_SEND_81PLUG=3, INTERNAL_UPDATE_81PLUG=4) should not be included in the document.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::PCBang;

Result result = PCBang_Initialize();

if (result.GetMethodCode() == static_cast<uint32_t>(SDKMethod::INITIALIZE))
{
    // Please implement logic to verify whether this result pertains to the PCBang_Initialize call.
}

Notes

  • REFRESH_USER_BENEFITS(83) corresponds to the benefit renewal callback in PCBang_UserLogin(), as there is no separate PCBang_RefreshUserBenefits function in the source code.
  • Although it has the same name as Stove::PCSDK::Log::SDKMethod, it is a separate enumeration.

See Also


SDKMethod (View)

Kind Enum · Module View · Version 3.0.0.4

Description

It is used to query Result::GetMethodCode() / CallbackResult::result.GetMethodCode() and identify which pop-up API function generated that result.

This document covers Stove::PCSDK::View::SDKMethod. Enumerations named SDKMethod also exist in other modules, such as BaseSDK and IAPSDK, and the meaning of their values varies by namespace (module).

Declaration

cpp
enum class SDKMethod : uint32_t
{
    INITIALIZE = 1U,
    UNINITIALIZE = 2U,
    // ... See the "Values" table below
    FETCH_WEB_OPEN_KEY = 162U,
};

Enum Values

CodeNameDescription
1INITIALIZEView_Initialize / View_InitializeWithWndInfo
2UNINITIALIZEView_UnInitialize
5GET_VERSIONThis is the corresponding code for View_GetVersion as defined in the design. However, since the current implementation simply calls the version lookup function in BaseSDK, the actual MethodCode returned may differ from this value.
81AUTO_POPUPView_AutoPopup / View_AutoPopupEx
83MANUAL_POPUPView_ManualPopup / View_ManualPopupEx
85NEWS_POPUPView_NewsPopup / View_NewsPopupEx
87COUPON_POPUPView_CouponPopup / View_CouponPopupEx
89Not used (COMMUNITY_POPUP, a deprecated number with no corresponding public function)
91VERIFY_IDENTIFICATION_POPUPView_VerifyIdentificationPopup
160SET_POPUP_DISALLOWEDView_SetPopupDisallowed
161CLOSE_ALL_POPUPSView_CloseAllPopups
162FETCH_WEB_OPEN_KEYView_FetchWebOpenKey

Do not include internal-use-only values (3, 4, 80, 82, 84, 86, 88, 90, 92, 93, 94, 95, 96, 97) in the document.

Example

cpp
CallbackResult callbackResult = /* value received from the callback */;

if (callbackResult.result.GetMethodCode() == (uint32_t)SDKMethod::MANUAL_POPUP)
{
    // Please implement the logic if this is the result of a call to View_ManualPopup or View_ManualPopupEx.
}

Notes

  • Sections 1 through 5 contain common code for the Lifecycle (initialization, deactivation, and version lookup), while sections 80 and above contain code specific to each pop-up.
  • In the 81–93 range, the pop-up API uses odd numbers, while even numbers are reserved for the internal fetch method.
  • View_AutoPopup and View_AutoPopupEx (as well as their corresponding entries in Manual/News/Coupon) share the same MethodCode, respectively.
  • Even for the same pop-up, the values differ depending on the interface. The new interface (e.g., Stove_AutoPopup) returns values in the 1000 range 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.

See Also


SDKResultCode (Base)

Kind Result Code · Module Base · Version 3.0.0.4

Description

These are the result code values for functions used in the SDK. They are the values returned by GetResultCode() for Result and GetResult().GetResultCode() for CallbackResult. A value of 0 (SUCCESS) indicates success; any other value indicates the cause of failure.

This document describes Stove::PCSDK::Base::SDKResultCode. There is a SDKResultCode enumeration with the same name in each module, including BaseSDK, and their values and meanings differ. Since they are distinguished only by their namespaces (Stove::PCSDK::<Module>::SDKResultCode), you must not use them interchangeably with values from other modules.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            enum class SDKResultCode : uint32_t
            {
                SUCCESS = 0U,
                FAIL = 1U,
                // ... See the "Values" table below
                UNKNOWN_ERROR = 255U,
            };
        }
    }
}

Enum Values

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
1FAILAn error has occurred. Please identify the cause of the error and try again.x
2INVALID_CONFIGThe config file cannot be found. You need to check the path to the configuration file.x
3INVALID_LOG_LEVELThe log level value is invalid. Please check the value in the calling code.x
4INVALID_LOG_PATHThe log path is invalid. Please check the value in the caller.x
5INVALID_PARAMAn incorrect parameter was entered. You must correct the call.x
6 ~ 15Not in use (reserved section)x
16BASE_NOT_INITIALIZEDThe SDK has not been initialized. You must first call Base_Initialize().x
17NOT_INITIALIZEDInitialization has not been performed. You must call the initialization method first.x
18ALREADY_INITIALIZEDIt has already been initialized. You must remove the duplicate initialization call.x
19INVALID_ACCESS_TOKENThe AccessToken cannot be found. You need to log in again or renew your token.OYour login session has expired. Please close the game and restart it. [OK]
20NULL_TOKEN_ENTITYThe token object cannot be found. Please try again; if the problem persists, please contact us.x
21NULL_ENTITYThe object cannot be found at this time. Please try again; if the problem persists, please contact us.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 HTTP API response error has occurred. Please try again; if the error persists, please contact us.OThe network connection is unstable. Please check your network status and try again. [OK]
24RESPONSE_INVALID_CODEThe HTTP API response code cannot be found. Please try again; if the issue persists, contact us.OThe network connection is unstable. Please check your network status and try again. [OK]
25RESPONSE_VALUE_IS_NULLThe HTTP API response is empty. Please try again; if the issue persists, please contact us.OThe network connection is unstable. Please check your network status and try again. [OK]
26RESPONSE_INVALID_VALUE_FORMATThe HTTP API response format is incorrect. Please try again; if the issue persists, please contact us.OThe network connection is unstable. Please check your network connection and try again. [OK]
27LOG_81PLUG_ERRORThis code is not in use.x
28UPDATE_81PLUG_FEED_ERRORThis code is not in use.x
29ASYNC_OPERATION_IN_PROGRESSAn asynchronous operation is currently in progress. Please try again after the operation is complete.x
30BASE_UNINITIALIZEDThe SDK has been uninitialized. It must be initialized again.x
31NOT_SUPPORTED_COUNTRYThis feature is not currently supported in your country.x
32AMPLITUDE_ERRORThe Amplitude transmission failed. Please try again. If the problem persists, please contact us.x
33 ~ 79Not in use (reserved section)x
80LANGUAGE_NOT_SETNo language has been set.x
81EMPTY_TRANSLATED_STRINGThere are no strings to translate.x
82NOT_FOUND_REQUIRED_INFORMATIONRequired information is missing. Please check the value in the caller section.x
83INVALID_GDS_INFOThere is no GDS information.x
84NEED_STOVE_LAUNCHERThe launcher must be running.OThe 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_REQUIREDThe launcher failed to generate the required values.x
86RENEW_TOKEN_MAX_RETRY_COUNT_EXCEEDEDThe number of token renewal attempts has been exceeded. You must log in again.OThe network connection is unstable. Please check your network status and try again. [OK]
87IPC_CONNECT_FAILEDThe IPC communication connection failed.OThe game is closing because it is not running through the Stove PC client. Please launch the game again from the client. If you don't have the client installed, please install it from the Stove website.[OK]
88IPC_AES_KEY_NOT_RECEIVEDThe AES encryption key was not received via IPC communication.OThe game is closing because it is not running through the Stove PC client. Please launch the game again from the client. If you haven't installed the client, please install it from the Stove website.[OK]
89IPC_TIMEOUTA timeout occurred in the IPC communication.OThe game is closing because it is not running through the Stove PC client. Please launch the game again from the client. If you don't have the client installed, please install it from the Stove website. [OK]
90CLOSE_ALL_POPUPS_FAILEDWe were unable to close all pop-ups. Please try again or check the status of the pop-ups.x
91LOCAL_DB_CREATE_WORKING_DIRECTORY_FAILEDThe local DB working folder could not be created. Please check the write permissions for the folder associated with the account running the program.x
92LOCAL_DB_CONNECT_FAILEDThe connection to the local database failed.x
93LOCAL_DB_CREATE_TABLE_FAILEDUnable to create the local database table.x
94 ~ 248Not in use (reserved section)x
249NETWORK_TRANSPORT_ERRORA network transmission error has occurred. (HTTP backend native error code externalError was returned.) Please check the network status and review GetExternalError() for the detailed cause.x
250JSON_EXCEPTIONAn HTTP API JSON response exception has occurred.OThe network connection is unstable. Please check your network status and try again. [OK]
251PCSDK_DLL_NOT_FOUNDThe PC SDK DLL could not be found. Please check the installation path and the distribution files.x
252NOT_IMPLEMENTEDThis feature has not been implemented.x
253UNMANAGED_EXCEPTIONAn unhandled exception has occurred.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONA managed exception has occurred.OA 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; you'll need to restart the game after exiting.
  • 84 NEED_STOVE_LAUNCHER — You'll need to restart the game after it ends
  • 87 IPC_CONNECT_FAILED — You will need to restart the game after it ends
  • 88 IPC_AES_KEY_NOT_RECEIVED — You'll need to restart the game after it ends
  • 89 IPC_TIMEOUT — You'll need to restart the game after it ends

If you run the game executable directly without launching the Stove PC client, error 87 (IPC_CONNECT_FAILED) or 89 (IPC_TIMEOUT) will occur. In this case, closing the game will automatically launch the launcher.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

StovePCUser user;
Result result = Base_GetUser(&user);

if (result.IsSuccessful())
{
    // Please implement the logic for the success case.
}
else if (result.GetResultCode() == static_cast<uint32_t>(SDKResultCode::BASE_NOT_INITIALIZED))
{
    // Please call `Base_Initialize` first.
}
else
{
    // Please implement the logic for other failure scenarios.
}

Notes

  • Stove::PCSDK::Base::SDKResultCode, and other modules also have their own separate SDKResultCode enumerations. Since values overlap across modules (e.g., codes 5 and 16 exist in other modules as well), you must distinguish between modules when making comparisons.
  • 27 (LOG_81PLUG_ERROR) and 28 (UPDATE_81PLUG_FEED_ERROR) are obsolete codes that are no longer in use.
  • We recommend first checking whether the operation succeeded using IsSuccessful(), and branching to the GetResultCode() value only if it fails.

See Also


SDKResultCode (IAP)

Kind Result Code · Module IAP · Version 3.0.0.4

Description

The SDKResultCode in this document is Stove::PCSDK::IAP::SDKResultCode. Although there are enumerations with the same name in other modules, such as the SDK and pop-ups, they are of different types, so be careful not to confuse them.

This is the value returned by Result::GetResultCode() / CallbackResult::GetResult().GetResultCode(). A value of 0 (SUCCESS) indicates success.

Declaration

cpp
enum class SDKResultCode : uint32_t
{
    SUCCESS = 0U,
    // ... See the "Values" table below
    UNKNOWN_ERROR = 255U,
};

Enum Values

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
1FAILFailurex
2INVALID_CONFIGThe config file cannot be foundx
3INVALID_LOG_LEVELThe log level value is invalid.x
4INVALID_LOG_PATHThe log path is invalid.x
5INVALID_PARAMAn invalid parameter was entered.x
6~15Not in use (reserved section)x
16BASE_NOT_INITIALIZEDThe SDK has not been initialized.x
17NOT_INITIALIZEDInitialization failed.x
18ALREADY_INITIALIZEDIt is already initialized.x
19INVALID_ACCESS_TOKENThe AccessToken cannot be foundOYour login session has expired. Please close the game and restart it. [OK]
20NULL_TOKEN_ENTITYThe Token object cannot be found.x
21NULL_ENTITYThe object cannot be found at this time.x
22HTTP_ERRORAn HTTP communication error has occurred.OThe network connection is unstable. Please check your network status and try again. [OK]
23RESPONSE_ERRORAn HTTP API response error has occurred.OThe network connection is unstable. Please check your network status and try again. [OK]
24RESPONSE_INVALID_CODECannot find the HTTP API response codeOThe network connection is unstable. Please check your network status and try again. [OK]
25RESPONSE_VALUE_IS_NULLThe HTTP API response is empty.OThe network connection is unstable. Please check your network status and try again. [OK]
26RESPONSE_INVALID_VALUE_FORMATThe HTTP API response format is incorrect.OThe network connection is unstable. Please check your network status and try again. [OK]
27LOG_81PLUG_ERRORThis code is not in use.x
28UPDATE_81PLUG_FEED_ERRORThis code is not in use.x
29ASYNC_OPERATION_IN_PROGRESSAn asynchronous task is currently in progress.x
30BASE_UNINITIALIZEDThe SDK has been uninitialized.x
31NOT_SUPPORTED_COUNTRYThis feature is not currently supported in your country.x
32Not used (skipped number)x
33POPUP_NOT_CREATEDThe task ended without a popup (WebView) being created. The code is passed to the onDestroy callback solely for internal cleanup purposes, and the C++ wrapper does not intercept this code to call the user's onDestroy function.x
34~79Not in use (reserved section)x
80VIEWUI_NOT_INITIALIZEDViewUI has not been initialized.x
81VIEWUI_UNINIT_FAILEDFailed to clean up ViewUIx
82WEBVIEW_CREATE_FAILFailed to create a WebViewx
83WEBVIEW_LOAD_URL_FAILFailed to load the URLx
84WEBVIEW_CLOSED_BEFORE_PURCHASEIAP_StartPurchase The WebView closed before the item purchase was completed while the API was running (WITH_WEBVIEW_AND_CONFIRM_RESULT option only)OThe purchase was not completed successfully. Please try again. [OK]
85PARAMETER_LENGTH_EXCEEDEDIAP_StartPurchase The length limit for the API parameter has been exceeded (serviceTxnNo has a 50-character limit, and extraData has a 500-character limit).OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
86INVALID_JSON_STRINGThe string is not in JSON format.OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
87WEBVIEW_CREATE_COOKIE_FAILFailed to create a 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 amount or quantity of the item you are trying to purchase is not a valid value.OThe payment information is invalid, so we cannot process the payment. Please try again. [OK]
89WEBVIEW_CLOSE_ALL_FAILFailed to close all WebViewsx
90WEBVIEW_CLOSE_FAILFailed to close WebViewx
91~250Not in use (reserved section)x
251PCSDK_DLL_NOT_FOUNDThe PC SDK DLL was not found.x
252NOT_IMPLEMENTEDThis feature has not been implemented.x
253UNMANAGED_EXCEPTIONAn unhandled exception has occurred.OA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONA managed exception has occurred.OA temporary issue has occurred. Please try again. [OK]
255UNKNOWN_ERRORAn unknown error has occurred.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

cpp
using namespace Stove::PCSDK::IAP;

Result result = IAP_Initialize(L"YOUR_SHOP_KEY");
if (result.GetResultCode() == static_cast<uint32_t>(SDKResultCode::ALREADY_INITIALIZED))
{
    // Please implement the logic for cases where it has already been initialized.
}

Notes

  • A module with the same name, SDKResultCode, also exists in other modules, such as the SDK and pop-ups. This document covers only the SDKResultCode for the payment feature.
  • Although the value range (80–90) appears to overlap with the range (80–89) for SDKMethod, these are different enumerations, so be careful not to confuse them.
  • Values in the 80–90 range indicate specific payment failure reasons, while the remaining values are commonly used across various modules, including the SDK.

See Also


SDKResultCode (Log)

Kind Result Code · Module Log · Version 3.4.1

Description

These are the result codes for the functions used in the logging feature. A value of Result::GetResultCode() (or CallbackResult.GetResult().GetResultCode()) indicates success, while a value of 0 (SUCCESS) indicates failure. Any other value indicates failure.

This document is SDKResultCode in the Stove::PCSDK::Log namespace. A separate enumeration with the same name also exists in the Stove::PCSDK::PCBang namespace, and its value structure is different (the PC Bang function uses codes 27 and 28 related to 81Plug instead of 80–86). You can verify which module a value belongs to using Result::GetSDKName().

Declaration

cpp
enum class SDKResultCode : uint32_t
{
    SUCCESS = 0U,
    FAIL = 1U,
    // ... See the "Values" table below
    LOG_SIZE_EXCEEDED = 86U,
};

Enum Values

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
1FAILFailurex
2INVALID_CONFIGThe config file cannot be found. You need to check the path to the configuration file.x
3INVALID_LOG_LEVELThe log level value is invalid. Please check the log level settings.x
4INVALID_LOG_PATHThe log path is invalid. You need to check the log path settings.x
5INVALID_PARAMNo valid parameters were entered. Please check the call parameters.x
(6–15)Not used (Skip)x
16BASE_NOT_INITIALIZEDThe SDK has not been initialized. You must first call Base_Initialize().x
17NOT_INITIALIZEDInitialization has not been performed. You must first call Log_Initialize().x
18ALREADY_INITIALIZEDIt is already initialized. Please try again after calling Log_UnInitialize().x
19INVALID_ACCESS_TOKENThe AccessToken cannot be found. Please verify your login status.OYour login session has expired. Please close the game and restart it. [OK]
20NULL_TOKEN_ENTITYThe Token object cannot be found. Please check your login status.x
21NULL_ENTITYThe object cannot be found at this time.x
22HTTP_ERRORAn HTTP communication error has occurred. Please check your network connection and try again.OThe network connection is not working properly. Please check your network connection and try again. [OK]
23RESPONSE_ERRORAn HTTP API response error has occurred. Please try again.OThe network connection is unstable. Please check your network status and try again. [OK]
24RESPONSE_INVALID_CODEThe HTTP API response code cannot be found. Please try again.OThe network connection is unstable. Please check your network status and try again. [OK]
25RESPONSE_VALUE_IS_NULLThe HTTP API response is empty. Please try again.OThe network connection is unstable. Please check your network status and try again. [OK]
26RESPONSE_INVALID_VALUE_FORMATThe HTTP API response format is invalid. Please try again.OThe network connection is unstable. Please check your network status and try again. [OK]
(27–28)Not used (Skip)x
29ASYNC_OPERATION_IN_PROGRESSAn asynchronous operation is currently in progress. Please try again once the operation is complete.x
30BASE_UNINITIALIZEDThe SDK has been uninitialized. You must call Base_Initialize() again and then try again.x
31NOT_SUPPORTED_COUNTRYThis feature is not currently supported in your country.x
(32–79)Not used (Skip)x
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_FAILEDThe connection to the local database failed. Please check the status of your local repository and try again.x
82LOCAL_DB_CREATE_TABLE_FAILEDFailed to create a table in the local database. Please check the status of your local storage and try again.x
83LOCAL_DB_DISCONNECT_FAILEDFailed to disconnect from the local database. Please check the status of the local repository and try again.x
84LOCAL_DB_BACKUP_LOG_FAILEDThe log backup to the local database failed. Please check the status of the local storage and try again.x
85INVALID_LOG_PARAMETERThe parameters for calling the log transmission API are invalid. Please check the parameters in the call.x
86LOG_SIZE_EXCEEDEDThe log size has exceeded the maximum limit. You must reduce the size of the log value and try again.x
(87–250)Not used (Skip)x
251PCSDK_DLL_NOT_FOUNDThe PC SDK DLL could not be found. Please check the SDK distribution file configuration.x
252NOT_IMPLEMENTEDThis feature has not been implemented.x
253UNMANAGED_EXCEPTIONAn unhandled exception has occurred.OThere was a temporary issue. Please try again. [OK]
254MANAGED_EXCEPTIONA managed exception has occurred.OThere was a temporary issue. 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; you'll need to restart the game after exiting.

Example

cpp
using namespace Stove::PCSDK::Log;

Log_Send(&logSendParam, [](CallbackResult callbackResult)
{
    if (callbackResult.GetResult().GetResultCode() == static_cast<uint32_t>(SDKResultCode::LOG_SIZE_EXCEEDED))
    {
        // Please implement logic to reduce the log size before resending it.
    }
});

Notes

  • 80~86 are code segments specific to the log functionality that relate to the local database and log transmission.
  • Stove::PCSDK::PCBang::SDKResultCode—Although it has the same name, it is a separate enumeration.

See Also


SDKResultCode (PCBang)

Kind Result Code · Module PCBang · Version 3.0.0.4

Description

This is the result code for the function used in feature PC Bang. If the value of Result::GetResultCode() (or CallbackResult.GetResult().GetResultCode()) is 0 (SUCCESS), the operation is successful; any other value indicates failure.

This document is SDKResultCode in the Stove::PCSDK::PCBang namespace. A separate enumeration with the same name also exists in the Stove::PCSDK::Log namespace, and its values are configured differently (the logging functions include additional codes 80–86 related to the local database instead of 27 and 28). You can verify which module the value actually belongs to using Result::GetSDKName().

Declaration

cpp
enum class SDKResultCode : uint32_t
{
    SUCCESS = 0U,
    FAIL = 1U,
    // ... See the "Values" table below
    UNKNOWN_ERROR = 255U,
};

Enum Values

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
1FAILFailurex
2INVALID_CONFIGThe config file cannot be found. You need to check the path to the configuration file.x
3INVALID_LOG_LEVELThe log level value is invalid. Please check the log level settings.x
4INVALID_LOG_PATHThe log path is invalid. Please verify the log path settings.x
5INVALID_PARAMAn incorrect parameter was entered. Please check the parameters in the calling code.x
(6–15)Not used (Skip)x
16BASE_NOT_INITIALIZEDThe SDK has not been initialized. You must first call Base_Initialize().x
17NOT_INITIALIZEDInitialization has not been performed. You must first call PCBang_Initialize().x
18ALREADY_INITIALIZEDIt is already initialized. Please try again after calling PCBang_UnInitialize().x
19INVALID_ACCESS_TOKENThe AccessToken cannot be found. Please verify your login status.OYour login session has expired. Please close the game and restart it. [OK]
20NULL_TOKEN_ENTITYThe token object cannot be found. Please verify your login status.x
21NULL_ENTITYThe object cannot be found at this time.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 HTTP API response error occurred. Please try again.OThe network connection is unstable. Please check your network status and try again. [OK]
24RESPONSE_INVALID_CODEThe HTTP API response code cannot be found. Please try again.OThe network connection is not working properly. Please check your network connection and try again. [OK]
25RESPONSE_VALUE_IS_NULLThe HTTP API response is empty. Please try again.OThe network connection is unstable. Please check your network status and try again. [OK]
26RESPONSE_INVALID_VALUE_FORMATThe HTTP API response format is incorrect. Please try again.OThe network connection is unstable. Please check your network connection and try again. [OK]
27LOG_81PLUG_ERRORThis code is not in use.x
28UPDATE_81PLUG_FEED_ERRORThis code is not in use.x
29ASYNC_OPERATION_IN_PROGRESSAn asynchronous operation is currently in progress. Please try again after the operation is complete.x
30BASE_UNINITIALIZEDThe SDK has been uninitialized. You must call Base_Initialize() again and then try again.x
31NOT_SUPPORTED_COUNTRYThis feature is not currently supported in your country.x
(32–250)Not used (Skip)x
251PCSDK_DLL_NOT_FOUNDThe PC SDK DLL could not be found. You need to check the SDK installation configuration.x
252NOT_IMPLEMENTEDThis feature has not been implemented.x
253UNMANAGED_EXCEPTIONAn unhandled exception has occurred.OThere was a temporary issue. Please try again. [OK]
254MANAGED_EXCEPTIONA managed exception has occurred.OThere was a temporary issue. 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; you'll need to restart the game after exiting.

Example

cpp
using namespace Stove::PCSDK::PCBang;

Result result = PCBang_Initialize();

if (result.GetResultCode() == static_cast<uint32_t>(SDKResultCode::ALREADY_INITIALIZED))
{
    // Please implement the logic for duplicate initialization.
}

Notes

  • 27(LOG_81PLUG_ERROR), 28(UPDATE_81PLUG_FEED_ERROR) are obsolete codes that are no longer in use.
  • Although it has the same name as Stove::PCSDK::Log::SDKResultCode, it is a separate enumeration.

See Also


SDKResultCode (View)

Kind Result Code · Module View · Version 3.0.0.4

Description

This is the error code for a query with the format Result::GetResultCode() / CallbackResult::result.GetResultCode(). 0 (SUCCESS) indicates success, while any other value indicates failure. SDK common codes and codes specific to the pop-up feature are defined together in a single enumeration.

This document covers Stove::PCSDK::View::SDKResultCode. Enumerations named SDKResultCode also exist in other modules, such as BaseSDK and IAPSDK, and the meaning of their values varies by namespace (module).

Declaration

cpp
enum class SDKResultCode : uint32_t
{
    SUCCESS = 0U,
    FAIL = 1U,
    // ... See the "Values" table below
    NO_POPUP_DATA = 87U,
};

Enum Values

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
1FAILFailurex
2INVALID_CONFIGThe config file cannot be foundx
3INVALID_LOG_LEVELThe log level value is invalid.x
4INVALID_LOG_PATHThe log path is invalid.x
5INVALID_PARAMAn incorrect parameter was entered. You must correct the call.x
16BASE_NOT_INITIALIZEDThe SDK has not been initialized. You must initialize the SDK first.x
17NOT_INITIALIZEDInitialization has not been performed. You must first call View_Initialize()/View_InitializeWithWndInfo().x
18ALREADY_INITIALIZEDIt is already initialized. You need to check whether it has been initialized more than once.x
19INVALID_ACCESS_TOKENThe AccessToken cannot be foundOYour login session has expired. Please close the game and restart it. [OK]
20NULL_TOKEN_ENTITYThe Token object cannot be foundx
21NULL_ENTITYThe object cannot be found at this time.x
22HTTP_ERRORAn HTTP communication error has occurred.x
23RESPONSE_ERRORAn HTTP API response error has occurred.x
24RESPONSE_INVALID_CODECannot find the HTTP API response codex
25RESPONSE_VALUE_IS_NULLThe HTTP API response is empty.x
26RESPONSE_INVALID_VALUE_FORMATThe HTTP API response format is incorrect.x
27LOG_81PLUG_ERRORThis code is not in use.x
28UPDATE_81PLUG_FEED_ERRORThis code is not in use.x
29ASYNC_OPERATION_IN_PROGRESSAn asynchronous operation is currently in progress. Please try again after the previous asynchronous operation has finished.x
30BASE_UNINITIALIZEDThe SDK has been uninitialized.x
31NOT_SUPPORTED_COUNTRYThis feature is not currently available in your country. Please check whether it is supported in your country.x
32Not used (skipped number)x
33POPUP_NOT_CREATEDThe task has ended without a popup (WebView) being created. The code is passed via the onDestroy callback solely for internal cleanup purposes; since the legacy C++ interface intercepts this code, it is not passed to the user onDestroy.x
251PCSDK_DLL_NOT_FOUNDThe PC SDK DLL could not be found.x
252NOT_IMPLEMENTEDThis feature has not been implemented.x
253UNMANAGED_EXCEPTIONAn unhandled exception has occurred.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONA managed exception has occurred.OA temporary issue has occurred. Please try again. [OK]
255UNKNOWN_ERRORAn unknown error has occurred.x
80VIEWUI_NOT_INITIALIZEDViewUI has not been initialized. You must verify whether the view has been initialized.x
81VIEWUI_UNINIT_FAILEDFailed to clean up ViewUIx
82WEBVIEW_CREATE_FAILFailed to create a WebViewx
83WEBVIEW_LOAD_URL_FAILFailed to load the URLx
84WEBVIEW_CLOSE_ALL_FAILFailed to close all WebViewsx
85WEBVIEW_CLOSE_FAILFailed to close WebViewx
86WEBVIEW_CREATE_COOKIE_FAILFailed to create a cookieOThe page cannot be loaded. Please try again. [OK]
87NO_POPUP_DATANo pop-up data exists.OThere is no pop-up configuration information, so there is no window to display. [OK]

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 close the game and restart it.

Example

cpp
CallbackResult callbackResult = /* value received from the callback */;
uint32_t resultCode = callbackResult.result.GetResultCode();

if (resultCode == (uint32_t)SDKResultCode::SUCCESS)
{
    // Please implement the logic for a successful outcome.
}
else if (resultCode == (uint32_t)SDKResultCode::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–5, 16–33, and 251–255 are common result codes shared with the SDK, while the range 80–87 consists of result codes specific to the pop-up feature. Unlike the new flat C interface, the common codes and module codes are not separated into distinct enumerations.
  • POPUP_NOT_CREATED(33) is code that the SDK uses internally in the onDestroy callback for pop-up-related functions; you will not see this code directly in your callback.
  • Lines 27 and 28 contain code related to the deprecated 81 Plug feature.

See Also


StoveLanguage

Kind Enum · Module Base · Version 3.0.0.4

Description

This value is used to configure the SDK's language settings. It is used as an input parameter for Base_SetLanguage().

These values do not indicate success or failure, but rather the type of language, and are defined sequentially starting from 0 (system).

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            enum class StoveLanguage : uint32_t
            {
                system = 0,
                en = 1,
                ko = 2,
                // ... See the "Values" table below
                vi = 11,
            };
        }
    }
}

Enum Values

CodeNameDescription
0systemSystem (Follows system settings)
1enEnglish
2koKorean
3jaJapanese
4zh_cnChinese (Simplified, People's Republic of China)
5zh_twChinese (Traditional, Taiwan)
6deGerman
7frFrench
8esSpanish, Castilian
9ptPortuguese
10thThai
11viVietnamese

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

Result result = Base_SetLanguage(StoveLanguage::en);

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

Notes

  • This is an input value specific to Base_SetLanguage(). It is separate from Base_SetLanguageEx(), which directly accepts string language codes.

See Also


StoveOverlayState

Kind Enum · Module Base · Version 3.0.0.4

Description

This is the value for the overlay display status. It is the value returned by GetOverlayState() for StovePCVietnamAgeRatingInfo and StovePCVietnamOverimmersionInfo.

This value does not indicate success or failure; rather, it indicates whether the overlay is shown, hidden, or expanded.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            enum class StoveOverlayState : uint32_t
            {
                SHOW = 0,
                HIDE = 1,
                EXPANDED = 2,
            };
        }
    }
}

Enum Values

CodeNameDescription
0SHOWDisplays the overlay.
1HIDEHides the overlay.
2EXPANDEDExpand the overlay.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

void __cdecl OnVietnamAgeRatingFinishedCallback(CallbackResult callbackResult, StovePCVietnamAgeRatingInfo vietnamAgeRatingInfo)
{
    if (callbackResult.result.IsSuccessful())
    {
        switch (vietnamAgeRatingInfo.GetOverlayState())
        {
        case StoveOverlayState::SHOW:
            // Please implement the logic for displaying overlays.
            break;
        case StoveOverlayState::HIDE:
            // Please implement the logic to hide the overlay.
            break;
        case StoveOverlayState::EXPANDED:
            // Please implement the overlay extension logic.
            break;
        }
    }
}

Notes

See Also


StovePCBangStatus

Kind Struct · Module PCBang · Version 3.0.2

Description

PCBang_CheckPCBangStatus() This is the structure of the callback received when making an API call. It contains the user benefit code, PC Bang unique ID, and PC Bang product code.

The SDK passes the value by populating the callback argument. It is passed as a value type and does not require explicit deallocation.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace PCBang
        {
            struct StovePCBangStatus
            {
            public:
                PCBangPremium GetPremiumStatus() const;
                int32_t GetPCBangSerialNumber() const;
                int32_t GetProductCode() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
GetPremiumStatus()PCBangPremiumReadHere is a user benefit code.
GetPCBangSerialNumber()int32_tReadPC Bang is the unique identifier.
GetProductCode()int32_tReadPC Bang is the product code.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::PCBang;

void __cdecl OnCheckPCBangStatusFinished(CallbackResult callbackResult, StovePCBangStatus pcBangStatus)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        PCBangPremium premiumStatus = pcBangStatus.GetPremiumStatus();
        int32_t productCode = pcBangStatus.GetProductCode();

        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

See Also


StovePCBangUserLogin

Kind Struct · Module PCBang · Version 3.0.2

Description

PCBang_UserLogin() This is the structure returned as a callback containing the login results when making an API call. It contains the user's benefit code, PC Bang unique ID, and PC Bang remaining premium time.

The SDK passes the value by populating the callback argument. It is passed as a value type and does not require separate deallocation.

If the login fails, none of the three fields will be submitted.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace PCBang
        {
            struct StovePCBangUserLogin
            {
            public:
                PCBangPremium GetPremiumStatus() const;
                int32_t GetPCBangSerialNumber() const;
                int32_t GetRemainTime() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
GetPremiumStatus()PCBangPremiumReadThis is a user benefit code. It will not be delivered if the attempt fails.
GetPCBangSerialNumber()int32_tReadPC Bang is the unique ID. It will not be passed if the operation fails.
GetRemainTime()int32_tReadPC Bang Time remaining for the Premium plan. If the transaction fails, the message will not be delivered.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::PCBang;

void __cdecl OnUserLoginFinished(CallbackResult callbackResult, StovePCBangUserLogin userLogin)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        PCBangPremium premiumStatus = userLogin.GetPremiumStatus();
        int32_t remainTime = userLogin.GetRemainTime();

        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

  • The result of the login for PCBang_UserLogin() is passed as a callback argument.
  • The callback runs in the thread that called Base_RunCallback().
  • Please refer to benefit code PCBangPremium.

See Also


StovePCChargeInfo

Kind Struct · Module IAP · Version 3.1.0

Description

Represents a single piece of information about the payment method used to purchase a product. It is passed as an array to the IAP_StartPurchase() callback (internal array StovePCPurchaseResult) and the IAP_ConfirmPurchase() callback (OnConfirmPurchaseFinished).

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

Although the Setter is exposed, in typical integrations, please use the values provided by the SDK for reading purposes only. Since the array and its individual items passed to the callback are no longer valid once the callback call ends, you must copy any values that need to be preserved (using the assignment operator or a copy constructor) within the callback.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace IAP
        {
            struct StovePCChargeInfo
            {
            public:
                double GetChargeDeductVal() const;
                void SetChargeDeductVal(double chargeDeductVal);
                double GetChargeDisplayDeductVal() const;
                void SetChargeDisplayDeductVal(double chargeDisplayDeductVal);
                int32_t GetChargeType() const;
                void SetChargeType(int32_t chargeType);
                const wchar_t* GetChargeTypeName() const;
                void SetChargeTypeName(const wchar_t* chargeTypeName);
            };
        }
    }
}

Members

NameTypeAccessDescription
GetChargeDeductVal() / SetChargeDeductVal()doubleReading and WritingThis is the payment amount.
GetChargeDisplayDeductVal() / SetChargeDisplayDeductVal()doubleReading and WritingThis is the cash conversion price based on the settlement price.
GetChargeType() / SetChargeType()int32_tReading and WritingThese are payment method codes. 98: STOVE Cash, 99: Points, and others: PG payment methods.
GetChargeTypeName() / SetChargeTypeName()const wchar_t*Reading and WritingThis is the name of the payment method.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::IAP;

void __cdecl OnConfirmPurchaseFinished(CallbackResult callbackResult, bool status,
    StovePCPurchasedProduct* purchasedProducts, uint32_t purchasedProductSize,
    StovePCChargeInfo* chargeInfos, uint32_t chargeInfoSize)
{
    if (callbackResult.GetResult().IsSuccessful() && status)
    {
        for (uint32_t i = 0; i < chargeInfoSize; ++i)
        {
            int32_t chargeType = chargeInfos[i].GetChargeType();
            double deductVal = chargeInfos[i].GetChargeDeductVal();

            // Please copy and save only the values you need.
        }
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

  • It is passed as the output of IAP_StartPurchase and IAP_ConfirmPurchase.
  • If multiple items (e.g., STOVE Cash + Points) are used together in a single transaction, the array may contain multiple entries.

See Also


StovePCFetchProductParam

Kind Struct · Module IAP · Version 3.0.0.4

Description

This is the structure passed when calling the IAP_FetchProducts() and IAP_FetchProductsEx() APIs. It contains the category and page information to be retrieved.

The caller declares it directly on the stack, fills it with a value using the Set*() method, and passes the address as a function argument. Since it is a value type, no separate deallocation is required.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace IAP
        {
            struct StovePCFetchProductParam
            {
            public:
                const wchar_t* GetCategoryId() const;
                void SetCategoryId(const wchar_t* categoryId);
                int32_t GetPageNumber() const;
                void SetPageNumber(int32_t number);
                int32_t GetPageSize() const;
                void SetPageSize(int32_t size);
            };
        }
    }
}

Members

NameTypeAccessDescription
GetCategoryId() / SetCategoryId()const wchar_t*Reading and WritingThis is the category ID. If you do not specify it (leave it blank), the system will retrieve the product list for all categories.
GetPageNumber() / SetPageNumber()int32_tReading and WritingThis is the page number when viewing product information. If not specified, the default value is 1.
GetPageSize() / SetPageSize()int32_tReading and WritingThis specifies the page size when retrieving product information. If not specified, the default value is 20. To retrieve all registered products, set PageNumber to 1 and set PageSize and int32_t to values no greater than the maximum value (2,147,483,647).

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::IAP;

StovePCFetchProductParam param;
param.SetCategoryId(L"");
param.SetPageNumber(1);
param.SetPageSize(20);

IAP_FetchProducts(&param, OnFetchProductsFinished);

Notes

See Also


StovePCGameProfile

Kind Struct · Module Base · Version 3.0.0.4

Description

This is the GameProfile structure passed when making a Base_SetGameProfile() API call. It contains the game's world ID and character ID.

The caller declares it directly on the stack, fills it with a value using the Set*() method, and passes its address as a function argument. Since it is a value type, no separate deallocation is required.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            struct StovePCGameProfile
            {
            public:
                const wchar_t* GetWorldId() const;
                void SetWorldId(const wchar_t* worldId);
                int64_t GetCharacterNumber() const;
                void SetCharacterNumber(int64_t number);

            public:
                StovePCGameProfile();
                StovePCGameProfile(const wchar_t* worldId, int64_t characterNumber);
            };
        }
    }
}

Members

NameTypeAccessDescription
GetWorldId() / SetWorldId()const wchar_t*Reading and WritingThis is the game's world identifier.
GetCharacterNumber() / SetCharacterNumber()int64_tReading and WritingThis is a character identifier.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

StovePCGameProfile gameProfile(L"world-1", 123456789LL);

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

  • In addition to the default constructor, it provides constructors that directly initialize worldId and characterNumber.

See Also


StovePCGds

Kind Struct · Module Base · Version 3.0.0.4

Description

Base_GetGds() This is a structure containing user information received during an API call. It includes the country code where the user logged in, the names of countries subject to regulations such as GDPR, the time zone, the UTC offset, and language information.

Once the caller declares it on the stack and passes its address to Base_GetGds(), the SDK fills in the value. Since it is a value type, no separate deallocation is required.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            struct StovePCGds
            {
            public:
                bool IsDefault() const;
                const wchar_t* GetNation() const;
                const wchar_t* GetRegulation() const;
                const wchar_t* GetTimeZone() const;
                int32_t GetUtcOffset() const;
                const wchar_t* GetLanguage() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
IsDefault()boolReadReturns false if the country code was processed correctly based on the IP address on the Stove platform, or if the country code was processed correctly but the time zone could not be processed. If the value is true, the country code was processed using the default value.
GetNation()const wchar_t*ReadThis is the country code information for the logged-in user. It returns the country code corresponding to the ISO 3166-1 ALPHA-2 code.
GetRegulation()const wchar_t*ReadIf the country is subject to regulations such as the GDPR, the name of the regulated country is returned.
GetTimeZone()const wchar_t*ReadReturns the ID based on the IANA Time Zone Database (TZDB), commonly known as the "Time Zone ID."
GetUtcOffset()int32_tReadReturns the UTC offset information in minutes based on the time zone ID.
GetLanguage()const wchar_t*ReadReturns the language code based on the ISO 639-1 ALPHA-2 code. For Chinese and Indonesian only, the code is returned as Simplified Chinese (zh), Traditional Chinese (zh-tw), and Indonesian (in).

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

StovePCGds gds;
Result result = Base_GetGds(&gds);

if (result.IsSuccessful())
{
    const wchar_t* nation = gds.GetNation();
    const wchar_t* timeZone = gds.GetTimeZone();

    // Please implement the logic for the success case.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • If IsDefault() is true, IP-based country code detection has failed and has been replaced with the STOVE default country code.

See Also


StovePCInitializeParam

Kind Struct · Module Base · Version 3.0.0.4

Description

This is the structure passed when calling the Base_Initialize() API. The same structure is also used for initialization-related APIs such as Base_RestartAppIfNecessary(), Base_RestartAppIfNecessaryAsync(), and Base_RestartAppIfNecessaryAsyncEx().

The caller declares it directly on the stack, fills it with a value using the Set*() method, and passes its address as a function argument. Since it is a value type, no separate deallocation is required.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            struct StovePCInitializeParam
            {
            public:
                const wchar_t* GetEnvironment() const;
                void SetEnvironment(const wchar_t* env);
                const wchar_t* GetGameID() const;
                void SetGameID(const wchar_t* gameId);
                const wchar_t* GetApplicationKey() const;
                void SetApplicationKey(const wchar_t* appKey);
            };
        }
    }
}

Members

NameTypeAccessDescription
GetEnvironment() / SetEnvironment()const wchar_t*Reading and WritingThis is the "Stove Environment" value.
GetGameID() / SetGameID()const wchar_t*Reading and WritingThis is the Stove Game ID.
GetApplicationKey() / SetApplicationKey()const wchar_t*Reading and WritingThis is the Stove Application key value.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

StovePCInitializeParam initParam;
initParam.SetEnvironment(L"real");
initParam.SetGameID(L"YOUR_GAME_ID");
initParam.SetApplicationKey(L"YOUR_APP_KEY");

Base_Initialize(&initParam, OnInitializeFinishedCallback);

Notes

  • The Base_RestartAppIfNecessary() series and Base_Initialize() share this feature.
  • If you need extended fields such as waitTimeMillisec, launchLauncher, or the platform name, please use Base_RestartAppIfNecessaryAsyncEx2(), which uses StovePCInitializeParamEx2.

See Also


StovePCInitializeParamEx2

Kind Struct · Module Base · Version 3.4.1

Description

This is the structure passed when calling the Base_RestartAppIfNecessaryAsyncEx2() API. In addition to the Environment, GameID, and ApplicationKey fields from StovePCInitializeParam, it also contains the wait time (waitTimeMillisec), whether the launcher is running (launchLauncher), and the platform name (platformName).

The caller declares it directly on the stack, fills it with a value using the Set*() method, and passes its address as a function argument. Since it is a value type, no separate deallocation is required.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            struct StovePCInitializeParamEx2
            {
            public:
                const wchar_t* GetEnvironment() const;
                void SetEnvironment(const wchar_t* env);
                const wchar_t* GetGameID() const;
                void SetGameID(const wchar_t* gameId);
                const wchar_t* GetApplicationKey() const;
                void SetApplicationKey(const wchar_t* appKey);
                uint32_t GetWaitTimeMillisec() const;
                void SetWaitTimeMillisec(uint32_t waitTime);
                bool GetLaunchLauncher() const;
                void SetLaunchLauncher(bool launch);
                const wchar_t* GetPlatformName() const;
                void SetPlatformName(const wchar_t* platformName);
            };
        }
    }
}

Members

NameTypeAccessDescription
GetEnvironment() / SetEnvironment()const wchar_t*Reading and WritingThese are the Stove Environment values.
GetGameID() / SetGameID()const wchar_t*Reading and WritingThis is the Stove Game ID.
GetApplicationKey() / SetApplicationKey()const wchar_t*Reading and WritingThis is the Stove Application key value.
GetWaitTimeMillisec() / SetWaitTimeMillisec()uint32_tReading and WritingThis is the wait time (in milliseconds).
GetLaunchLauncher() / SetLaunchLauncher()boolReading and WritingWhether the launcher is running.
GetPlatformName() / SetPlatformName()const wchar_t*Reading and WritingThis is the name of the platform (e.g., Stove, Steam).

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

StovePCInitializeParamEx2 initParam;
initParam.SetEnvironment(L"real");
initParam.SetGameID(L"YOUR_GAME_ID");
initParam.SetApplicationKey(L"YOUR_APP_KEY");
initParam.SetWaitTimeMillisec(60000);
initParam.SetLaunchLauncher(true);
initParam.SetPlatformName(L"Stove");

Base_RestartAppIfNecessaryAsyncEx2(&initParam, OnRestartAppIfNecessaryAsyncFinishedCallback);

Notes

  • This is a parameter specific to Base_RestartAppIfNecessaryAsyncEx2(). Unlike Base_RestartAppIfNecessaryAsyncEx(), which accepts waitTimeMillisec and launchLauncher as separate arguments, this single structure contains all the options.
  • Although the source code contains reserved fields (reserved1 to reserved5) for future expansion, they are not included in this documentation because they lack public getters and setters.

See Also


StovePCInventoryItem

Kind Struct · Module IAP · Version 3.0.0.4

Description

Represents a single entry in the user's purchase history. It is passed as an array to the OnFetchInventoryFinished callback as a result of the IAP_FetchInventory() call.

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

The array and each item passed to a callback are no longer valid once the callback has finished executing. Any values that need to be preserved must be copied (using the assignment operator or a copy constructor) within the callback.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace IAP
        {
            struct StovePCInventoryItem
            {
            public:
                int64_t GetTransactionMasterNumber() const;
                int64_t GetTransactionDetailNumber() const;
                int64_t GetProductId() const;
                const wchar_t* GetGameItemId() const;
                const wchar_t* GetProductName() const;
                int32_t GetQuantity() const;
                const wchar_t* GetThumbnailUrl() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
GetTransactionMasterNumber()int64_tReadThis is the unique master number for the transaction.
GetTransactionDetailNumber()int64_tReadThis is the unique transaction ID.
GetProductId()int64_tReadThis is the platform product ID.
GetGameItemId()const wchar_t*ReadThis is the in-game item ID mapped to the product ID.
GetProductName()const wchar_t*ReadProduct Name.
GetQuantity()int32_tReadQuantity. This is the quantity provided in the purchase request.
GetThumbnailUrl()const wchar_t*ReadThis is the URL for the featured product image.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::IAP;

void __cdecl OnFetchInventoryFinished(CallbackResult callbackResult, StovePCInventoryItem* inventoryItems, uint32_t inventoryItemSize)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        for (uint32_t i = 0; i < inventoryItemSize; ++i)
        {
            int64_t productId = inventoryItems[i].GetProductId();
            const wchar_t* productName = inventoryItems[i].GetProductName();

            // Please copy and save only the values you need.
        }
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

  • It is passed only as the output of IAP_FetchInventory.
  • View your entire purchase history; there are no page parameters.

See Also


StovePCLogSendParam

Kind Struct · Module Log · Version 3.4.1

Description

This is the structure passed when calling the Log_Send() API. It contains the account and character identifiers, marketing integration information, game, server, and level context, log group ID, and free-form log body.

The caller declares it directly on the stack, fills it with a value using the Set*() method, and passes the address as a function argument. Since it is a value type, no separate deallocation is required.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Log
        {
            struct StovePCLogSendParam
            {
            public:
                int64_t GetAuid() const;
                void SetAuid(int64_t auid);
                int64_t GetCuid() const;
                void SetCuid(int64_t cuid);
                const wchar_t* GetMktType1() const;
                void SetMktType1(const wchar_t* mktType1);
                const wchar_t* GetMktId1() const;
                void SetMktId1(const wchar_t* mktId1);
                const wchar_t* GetMktType2() const;
                void SetMktType2(const wchar_t* mktType2);
                const wchar_t* GetMktId2() const;
                void SetMktId2(const wchar_t* mktId2);
                const wchar_t* GetGameVersion() const;
                void SetGameVersion(const wchar_t* gameVersion);
                const wchar_t* GetLogGroupId() const;
                void SetLogGroupId(const wchar_t* logGroupId);
                const wchar_t* GetServerCd() const;
                void SetServerCd(const wchar_t* serverCd);
                const wchar_t* GetServerCdDet() const;
                void SetServerCdDet(const wchar_t* serverCdDet);
                const wchar_t* GetLvCd() const;
                void SetLvCd(const wchar_t* lvCd);
                const wchar_t* GetLvCdDet() const;
                void SetLvCdDet(const wchar_t* lvCdDet);
                const wchar_t* GetContents() const;
                void SetContents(const wchar_t* contents);
            };
        }
    }
}

Members

User Identification

NameTypeAccessDescription
GetAuid() / SetAuid()int64_tReading and WritingA unique ID for each account (if the game supports this concept).
GetCuid() / SetCuid()int64_tReading and WritingThis is a unique ID for each character (if the game supports this concept).

Marketing Integration Information

NameTypeAccessDescription
GetMktType1() / SetMktType1()const wchar_t*Reading and WritingThis is the name of the integrated third-party marketing service (1).
GetMktId1() / SetMktId1()const wchar_t*Reading and WritingThis is the unique key value associated with the integrated third-party marketing service (1).
GetMktType2() / SetMktType2()const wchar_t*Reading and WritingNames of integrated third-party marketing services (2).
GetMktId2() / SetMktId2()const wchar_t*Reading and WritingThis is the unique key value associated with the integrated third-party marketing service (2).

Game · Server Context

NameTypeAccessDescription
GetGameVersion() / SetGameVersion()const wchar_t*Reading and WritingThis is the game build version.
GetServerCd() / SetServerCd()const wchar_t*Reading and WritingThis is the server code (if the game includes a server component).
GetServerCdDet() / SetServerCdDet()const wchar_t*Reading and WritingHere are the server code details (if the game provides server details).
GetLvCd() / SetLvCd()const wchar_t*Reading and WritingThis is the level information at the time the log was recorded (per account).
GetLvCdDet() / SetLvCdDet()const wchar_t*Reading and WritingThis is the level information at the time the log was recorded (per character).

Log Group · Main Text

NameTypeAccessDescription
GetLogGroupId() / SetLogGroupId()const wchar_t*Reading and WritingThis is the Log Group ID used to map logs that should be grouped together.
GetContents() / SetContents()const wchar_t*Reading and WritingThis field is used to send data other than the fields listed above as a JSON string.

Example

cpp
using namespace Stove::PCSDK::Log;

StovePCLogSendParam logSendParam;
logSendParam.SetAuid(auid);
logSendParam.SetCuid(cuid);
logSendParam.SetGameVersion(L"1.2.3");
logSendParam.SetContents(L"{\"event\":\"login\"}");

Log_Send(&logSendParam, OnLogSendFinishedCallback);

Notes

  • It is used only as an input parameter for Log_Send().
  • You do not need to configure fields for which you do not know the values.
  • GetLvCdDet()/SetLvCdDet(), unlike the "Det" suffix in its name, is not a subentry of LvCd (account scope), but rather a value corresponding to the character scope.

See Also


StovePCOrderProduct

Kind Struct · Module IAP · Version 3.0.0.4

Description

Represents a single item to be purchased. It is used to compile the list of items for purchase, which consists of StovePCStartPurchaseParam items.

The caller declares it directly on the stack, fills it with a value using the Set*() method, and passes it to StovePCStartPurchaseParam::SetOrderProduct(). Since it is a value type, no separate dereference is required.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace IAP
        {
            struct StovePCOrderProduct
            {
            public:
                int64_t GetProductId() const;
                void SetProductId(int64_t id);
                double GetSalePrice() const;
                void SetSalePrice(double salePrice);
                int32_t GetQuantity() const;
                void SetQuantity(int32_t quantity);
            };
        }
    }
}

Members

NameTypeAccessDescription
GetProductId() / SetProductId()int64_tReading and WritingThis is the platform product ID.
GetSalePrice() / SetSalePrice()doubleReading and WritingThis is the selling price of the product.
GetQuantity() / SetQuantity()int32_tReading and WritingQuantity.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::IAP;

StovePCOrderProduct orderProduct;
orderProduct.SetProductId(1234567890LL);
orderProduct.SetSalePrice(9900.0);
orderProduct.SetQuantity(1);

StovePCStartPurchaseParam startPurchaseParam;
startPurchaseParam.CreateOrderProduct(1);
startPurchaseParam.SetOrderProduct(0, &orderProduct);

Notes

  • Please pass the GetProductId() value from StovePCProduct or StovePCProductEx to ProductId as-is.
  • Since SalePrice is compared to the price observed by the server at the time of purchase, you must pass the GetSalePrice() value for the viewed item exactly as it is. If the values differ, the purchase may be rejected.

See Also


StovePCOverImmersion

Kind Struct · Module Base · Version 3.0.0.4

Description

This is the structure received when making a Base_OverImmersionNotification() API call related to preventing excessive gaming. It contains an excessive gaming warning message, the elapsed game time (in hours), and the minimum message display time (in seconds).

The SDK passes the value by populating the callback argument. The value is passed as a value type, so no separate deallocation is required.

Values are passed only in the callbacks of the API designed exclusively for individuals subject to South Korea's internet addiction prevention measures.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            struct StovePCOverImmersion
            {
            public:
                const wchar_t* GetWarningMessage() const;
                int32_t GetElapsedTimeInHours() const;
                int32_t GetMinExposureTimeInSeconds() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
GetWarningMessage()const wchar_t*ReadThis is a warning about excessive engagement.
GetElapsedTimeInHours()int32_tReadThis is the game elapsed time (in hours).
GetMinExposureTimeInSeconds()int32_tReadThis is the minimum display time (in seconds) for the message.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

void __cdecl OnOverImmersionFinishedCallback(CallbackResult callbackResult, StovePCOverImmersion overImmersion)
{
    if (callbackResult.result.IsSuccessful())
    {
        const wchar_t* warningMessage = overImmersion.GetWarningMessage();
        int32_t minExposureTimeInSeconds = overImmersion.GetMinExposureTimeInSeconds();

        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

  • Base_OverImmersionNotification() is an API designed exclusively for South Korea that sends notifications to individuals subject to South Korea’s gaming addiction prevention measures every hour they play a game.
  • The callback runs in the thread that called Base_RunCallback().

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 is the value set to StovePCPaymentOption::SetOperation() when calling IAP_StartPayment / IAP_StartPaymentEx. It determines whether to use Stove Webview.

Declaration

cpp
enum class StovePCPaymentOperation : uint32_t
{
    DEFAULT = 0,
    WITH_WEBVIEW = 1,
    _MAX_COUNT
};

Enum Values

CodeNameDescription
0DEFAULTThis is the most basic procedure. Use this when manually integrating in-game cash purchases without using Stove Webview. You must open the Stove web payment page separately using the one-time URL included in the results to complete the payment.
1WITH_WEBVIEWOpen the Stove web payment page via Stove Webview and proceed to purchase game cash.
2_MAX_COUNTNot used (This value indicates the end of the enumeration and is not a valid operation.)

Example

cpp
using namespace Stove::PCSDK::IAP;

StovePCPaymentOption options;
options.SetOperation(StovePCPaymentOperation::WITH_WEBVIEW);

Notes

  • If you set it to WITH_WEBVIEW, the WebviewMode / WebviewRect settings in StovePCPaymentOption will be applied as well.

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.

IAP_StartPayment() This structure specifies the operation mode (manual integration / Stove WebView integration) and the display location when using WebView.

The caller declares it directly on the stack and then populates it with a value using the Set*() method. Since it is a value type, no separate deallocation is required.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace IAP
        {
            struct StovePCPaymentOption
            {
            public:
                StovePCPaymentOperation GetOperation() const;
                void SetOperation(StovePCPaymentOperation operation);
                Base::WebViewMode GetWebviewMode() const;
                void SetWebviewMode(Base::WebViewMode mode);
                void GetWebviewRect(int32_t* x, int32_t* y, int32_t* width, int32_t* height) const;
                void SetWebviewRect(int32_t x, int32_t y, int32_t width, int32_t height);
            };
        }
    }
}

Members

NameTypeAccessDescription
GetOperation() / SetOperation()StovePCPaymentOperationReading and WritingIAP_StartPayment() This is how it works when executed.
GetWebviewMode() / SetWebviewMode()WebViewModeReading and WritingThis type applies when using Stove Webview. It applies when Operation != DEFAULT.
GetWebviewRect() / SetWebviewRect()int32_t x, y, width, heightReading and WritingSets and retrieves the position and size (x, y, width, height) of the WebView used to display the Stove payment page all at once. Internally, this corresponds to the four fields webviewPosX, webviewPosY, webviewWidth, and webviewHeight. Applies when Operation != DEFAULT is set.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;
using namespace Stove::PCSDK::IAP;

StovePCPaymentOption option;
option.SetOperation(StovePCPaymentOperation::WITH_WEBVIEW);
option.SetWebviewMode(WebViewMode::EXTERNAL);
option.SetWebviewRect(0, 0, 800, 600);

IAP_StartPayment(&option, OnStartPaymentFinished);

Notes

  • IAP_StartPayment() is used for one-time purchases, such as in-game currency. To purchase items, please use IAP_StartPurchase(), which uses StovePCPurchaseOption.
  • If you need the result when the pop-up closes, please use IAP_StartPaymentEx.

See Also


StovePCPopupDisallowed

Kind Struct · Module View · Version 3.0.0.4

Description

This is a structure that defines the data type used as an input parameter for View_SetPopupDisallowed. It contains the ID of the pop-up to be hidden and the duration (in days) during which it will be hidden.

A standard C++ value type created and owned by the caller. It is managed by default constructors and destructors, without a separate creation/destruction API.

Declaration

cpp
class StovePCPopupDisallowed
{
public:
    StovePCPopupDisallowed();

    uint32_t GetPopupId() const;
    void SetPopupId(uint32_t popupId);

    uint32_t GetDays() const;
    void SetDays(uint32_t days);
};

Members

NameTypeAccessAccessorDescription
popupIduint32_tReading and WritingGetPopupId() / SetPopupId(uint32_t)The ID of the popup that should not be displayed
daysuint32_tReading and WritingGetDays() / SetDays(uint32_t)Number of days without pop-ups

Example

cpp
using namespace Stove::PCSDK::View;

StovePCPopupDisallowed disallowed;
disallowed.SetPopupId(popupId);
disallowed.SetDays(7);

View_SetPopupDisallowed(&disallowed, nullptr);

Notes

  • It is used only as an input parameter for View_SetPopupDisallowed.
  • Since it provides a copy constructor and an assignment operator, you can freely copy it as a value type.
  • 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, to populate this value, the game (studio) must separately know the identifier assigned when the popup was registered.

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.

Represents a single item sold in a store. It is passed as an array to the OnFetchProductsFinished callback as a result of the IAP_FetchProducts() call.

This is the value type that the SDK populates and passes via a callback. The caller does not create it directly. Since it has 31 members, the ## Fields section below is grouped by category.

StovePCProductEx is a 32-field structure that consists of the same 31 fields as this structure, plus one additional PurchaseAvailabilityCode (purchase-eligible code) field. IAP_FetchProducts() uses StovePCProduct, and IAP_FetchProductsEx() uses StovePCProductEx. IAP_FetchProducts() has been deprecated, so please always use IAP_FetchProductsEx() for actual integration.

The array passed to the callback and its individual elements are no longer valid once the callback has finished executing. Any values that need to be preserved must be copied (using the assignment operator or a copy constructor) within the callback.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace IAP
        {
            struct StovePCProduct
            {
            public:
                // To access members, use the getter methods listed in the "Fields" section below.
            };
        }
    }
}

Members

Basic Information

NameTypeAccessDescription
GetProductId()int64_tReadThis is the platform product ID.
GetGameItemId()const wchar_t*ReadThis is the in-game item ID mapped to the product ID.
GetName()const wchar_t*ReadProduct Name.
GetDescription()const wchar_t*ReadProduct Details.
GetQuantity()int32_tReadThis is the quantity of each individual item.
GetProductTypeCode()ProductTypeCodeReadThese are item type codes.
GetCategoryId()const wchar_t*ReadThis is the category ID.
GetCategoryName()const wchar_t*ReadThis is the category name.
GetThumbnailUrl()const wchar_t*ReadThis is the URL for the featured product image.

Price

NameTypeAccessDescription
GetCurrencyCode()const wchar_t*ReadThis is the currency code. It is used to display product prices.
GetPrice()doubleReadThis is the product's list price (checkout price). Please use this only to display the product's list price.
GetDisplayPrice()doubleReadThis is the list price (display price). It is not currently in use.
GetDisplayPriceString()const wchar_t*ReadThis is the product list price text (display). Please use it only for displaying the list price.
GetSalePrice()doubleReadThis is the product selling price (payment amount). It is the value displayed in the store as the actual selling price and the value provided when a purchase request is made. If a discount is set in Partners, the discounted price is automatically applied.
GetDisplaySalePrice()doubleReadThis is the product selling price (display). It is currently not in use.
GetDisplaySalePriceString()const wchar_t*ReadThe product selling price is a string (display price). It is used when displaying the actual selling price, including the currency symbol, in the store. If a discount is set in Partners, the discounted price is automatically reflected.

Discount

NameTypeAccessDescription
IsDiscount()boolReadWhether there is a discount.
GetDiscountType()DiscountTypeReadThis is a discount type.
GetDiscountTypeValue()int32_tReadThis is the discounted price.
GetDiscountBeginDate()int64_tReadThis is the discount start date (epoch time in milliseconds).
GetDiscountEndDate()int64_tReadThis is the discount expiration date (epoch time in milliseconds).

Purchase Quantity and History

NameTypeAccessDescription
GetTotalQuantity()int32_tReadThis is the total number of items sold.
GetMemberQuantity()int32_tReadThis is the member's purchase quantity. This is the purchase quantity for each logged-in account.
GetGuidQuantity()int32_tReadThis is the purchase quantity for the GUID. It represents the unique purchase quantity per account in the game.
CanWithdraw()boolReadWhether it is possible to withdraw a subscription application.
GetPurchasedAtLeastOnce()boolReadWhether a purchase was made. If there is at least one purchase in the history, the value is true.

Purchase Limits and Sales Periods

NameTypeAccessDescription
GetPurchaseLimitTypeCode()PurchaseLimitTypeCodeReadThis is a type of purchase restriction.
GetPurchaseLimitCount()int32_tReadThis is the sales limit. If the value of GetPurchaseLimitTypeCode() is CHARACTER, this is the limit per member.
GetSaleLimitCount()int32_tReadThis is the total sales limit. If the value is 0, there is no limit.
GetSaleBeginDate()int64_tReadThe start date of the sale (epoch time in milliseconds). If the sale is ongoing, returns 0.
GetSaleEndDate()int64_tReadThis is the end date of the sale (epoch time in milliseconds). If the sale is ongoing, it returns 0.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::IAP;

void __cdecl OnFetchProductsFinished(CallbackResult callbackResult, StovePCProduct* products, uint32_t productSize)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        for (uint32_t i = 0; i < productSize; ++i)
        {
            int64_t productId = products[i].GetProductId();
            const wchar_t* name = products[i].GetName();
            double salePrice = products[i].GetSalePrice();
            bool onSale = products[i].IsDiscount();

            // Please copy and save only the values you need.
        }
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

Notes

  • It is passed only as the output of IAP_FetchProducts.
  • Please use GetPrice() / GetSalePrice() for payment processing (server verification), and GetDisplayPrice() / GetDisplaySalePrice() / GetDisplayPriceString() / GetDisplaySalePriceString() for display purposes only.
  • Since the system checks for discrepancies with the price observed by the server at the time of purchase, you must pass the GetSalePrice() value for this product as-is to SalePrice in StovePCOrderProduct.

See Also


StovePCProductEx

Kind Struct · Module IAP · Version 3.4.1

Description

Represents a single item sold in a store. The result of the IAP_FetchProductsEx() call is passed to the OnFetchProductsExFinished callback as an array.

This is the value type that the SDK populates and passes via a callback. The caller does not create it directly. Since it has 32 members, the ## Fields section below is grouped by category.

This structure consists of 32 fields: the same 31 fields as StovePCProduct, plus one additional field, PurchaseAvailabilityCode (purchase code). IAP_FetchProducts() uses StovePCProduct, and IAP_FetchProductsEx() uses StovePCProductEx. If you need an "Available for Purchase" code, please use IAP_FetchProductsEx().

The array and its individual elements passed to a callback are no longer valid once the callback has finished executing. Any values that need to be preserved must be copied (using the assignment operator or a copy constructor) within the callback.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace IAP
        {
            struct StovePCProductEx
            {
            public:
                // To access members, use the getter methods in the "Fields" section below.
            };
        }
    }
}

Members

Basic Information

NameTypeAccessDescription
GetProductId()int64_tReadThis is the platform product ID.
GetGameItemId()const wchar_t*ReadThis is the in-game item ID mapped to the product ID.
GetName()const wchar_t*ReadProduct Name.
GetDescription()const wchar_t*ReadProduct Details.
GetQuantity()int32_tReadThis is the quantity of each individual item.
GetProductTypeCode()ProductTypeCodeReadThese are item type codes.
GetCategoryId()const wchar_t*ReadThis is the category ID.
GetCategoryName()const wchar_t*ReadThis is the category name.
GetThumbnailUrl()const wchar_t*ReadThis is the URL for the featured product image.

Price

NameTypeAccessDescription
GetCurrencyCode()const wchar_t*ReadThis is the currency code. It is used to display product prices.
GetPrice()doubleReadThis is the product's list price (payment price). Please use this only to display the product's list price.
GetDisplayPrice()doubleReadThis is the list price (display price). It is not currently in use.
GetDisplayPriceString()const wchar_t*ReadThis is the product list price string (display). Please use it only for displaying the list price.
GetSalePrice()doubleReadThis is the product sales price (payment amount). It is the value displayed in the store as the actual sales price and the value provided when a purchase request is made. If a discount is set in Partners, the discounted price is automatically applied.
GetDisplaySalePrice()doubleReadThis is the product sales price (display). It is currently not in use.
GetDisplaySalePriceString()const wchar_t*ReadThe product sales price is a string (display price). It is used when displaying the actual sales price, including the currency symbol, in the store. If a discount is set in Partners, the discounted price is automatically applied.

Discount

NameTypeAccessDescription
IsDiscount()boolReadWhether there is a discount.
GetDiscountType()DiscountTypeReadThis is a discount type.
GetDiscountTypeValue()int32_tReadThis is the discounted price.
GetDiscountBeginDate()int64_tReadThis is the discount start date (epoch time in milliseconds).
GetDiscountEndDate()int64_tReadThis is the discount expiration date (epoch time in milliseconds).

Purchase Quantity and History

NameTypeAccessDescription
GetTotalQuantity()int32_tReadThis is the total number of items sold.
GetMemberQuantity()int32_tReadThis is the member's purchase quantity. This is the purchase quantity for each logged-in account.
GetGuidQuantity()int32_tReadThis is the purchase quantity for the GUID. It represents the unique purchase quantity per account in the game.
CanWithdraw()boolReadWhether it is possible to withdraw a subscription application.
GetPurchasedAtLeastOnce()boolReadWhether a purchase was made. If there is at least one purchase in the purchase history, the value is true.

Purchase Limits and Sales Periods

NameTypeAccessDescription
GetPurchaseLimitTypeCode()PurchaseLimitTypeCodeReadThis is a type of purchase restriction.
GetPurchaseLimitCount()int32_tReadThis is the sales limit. If the value of GetPurchaseLimitTypeCode() is CHARACTER, this is the limit per member.
GetSaleLimitCount()int32_tReadThis is the total sales limit. If the value is 0, there is no limit.
GetSaleBeginDate()int64_tReadThe start date of the sale (epoch time in milliseconds). If the sale is ongoing, it returns 0.
GetSaleEndDate()int64_tReadThis is the end date of the sale (epoch time in milliseconds). If the sale is ongoing, it returns 0.
GetPurchaseAvailabilityCode()int16_tReadThis indicates whether a purchase is possible. (1: Purchase possible, 2: Purchase not possible (purchase limit exceeded)) Even if this value is 1, a "Purchase not possible" response may be returned if you request to purchase more than the remaining quantity. This is a field specific to StovePCProductEx that is not present in StovePCProduct.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::IAP;

void __cdecl OnFetchProductsExFinished(CallbackResult callbackResult, StovePCProductEx* products, uint32_t productSize)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        for (uint32_t i = 0; i < productSize; ++i)
        {
            int64_t productId = products[i].GetProductId();
            const wchar_t* name = products[i].GetName();
            double salePrice = products[i].GetSalePrice();
            int16_t availability = products[i].GetPurchaseAvailabilityCode();

            // Please copy and save only the values you need.
        }
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

  • It is passed only as the output of IAP_FetchProductsEx.
  • Please use GetPrice() / GetSalePrice() for payment processing (server verification), and GetDisplayPrice() / GetDisplaySalePrice() / GetDisplayPriceString() / GetDisplaySalePriceString() solely for display purposes.
  • Since the system checks for discrepancies with the price observed by the server at the time of purchase, you must pass the GetSalePrice() value for this product as-is to SalePrice in StovePCOrderProduct.

See Also


StovePCPurchasedProduct

Kind Struct · Module IAP · Version 3.1.0

Description

Represents a single item that has been purchased. It is passed as an array to the IAP_StartPurchase() callback (internal array StovePCPurchaseResult) and the IAP_ConfirmPurchase() callback (OnConfirmPurchaseFinished).

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

Although the Setter is exposed, in typical integrations, please use the values provided by the SDK for reading purposes only. Since the array and individual items passed to the callback are no longer valid once the callback call ends, you must copy any values that need to be retained (using the assignment operator or a copy constructor) within the callback.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace IAP
        {
            struct StovePCPurchasedProduct
            {
            public:
                int64_t GetTransactionDetailNumber() const;
                void SetTransactionDetailNumber(int64_t transactionDetailNumber);
                int64_t GetProductId() const;
                void SetProductId(int64_t productId);
                const wchar_t* GetCategoryId() const;
                void SetCategoryId(const wchar_t* categoryId);
                int32_t GetTotalQuantity() const;
                void SetTotalQuantity(int32_t totalQuantity);
                int32_t GetMemberQuantity() const;
                void SetMemberQuantity(int32_t memberQuantity);
                int32_t GetGuidQuantity() const;
                void SetGuidQuantity(int32_t guidQuantity);
            };
        }
    }
}

Members

NameTypeAccessDescription
GetTransactionDetailNumber() / SetTransactionDetailNumber()int64_tReading and WritingThis is the purchase detail number (TID of the purchased item).
GetProductId() / SetProductId()int64_tReading and WritingThis is the platform product ID.
GetCategoryId() / SetCategoryId()const wchar_t*Reading and WritingThis is the category ID.
GetTotalQuantity() / SetTotalQuantity()int32_tReading and WritingThis is the total number of items sold.
GetMemberQuantity() / SetMemberQuantity()int32_tReading and WritingThis is the member's purchase quantity.
GetGuidQuantity() / SetGuidQuantity()int32_tReading and WritingThis is the quantity of GUIDs purchased.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::IAP;

void __cdecl OnConfirmPurchaseFinished(CallbackResult callbackResult, bool status,
    StovePCPurchasedProduct* purchasedProducts, uint32_t purchasedProductSize,
    StovePCChargeInfo* chargeInfos, uint32_t chargeInfoSize)
{
    if (callbackResult.GetResult().IsSuccessful() && status)
    {
        for (uint32_t i = 0; i < purchasedProductSize; ++i)
        {
            int64_t productId = purchasedProducts[i].GetProductId();
            int64_t transactionDetailNumber = purchasedProducts[i].GetTransactionDetailNumber();

            // Please copy and save only the values you need.
        }
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

Notes

  • It is passed as the output of IAP_StartPurchase and IAP_ConfirmPurchase.
  • In the IAP_StartPurchase() callback, PurchaseOption's Operation is WITH_WEBVIEW_AND_CONFIRM_RESULT and is populated only when the payment is successful.

See Also


StovePCPurchaseOperation

Kind Enum · Module IAP · Version 3.0.0.4

Description

This is the value set to StovePCPurchaseOption::SetOperation() when calling IAP_StartPurchase / IAP_StartPurchaseEx. It determines whether to use Stove Webview and the method for processing purchase confirmation.

Declaration

cpp
enum class StovePCPurchaseOperation : uint32_t
{
    DEFAULT = 0,
    WITH_WEBVIEW = 1,
    WITH_WEBVIEW_AND_CONFIRM_RESULT = 2,
    _MAX_COUNT
};

Enum Values

CodeNameDescription
0DEFAULTThis is the most basic operation. It is used when manually integrating in-game purchases without using Stove Webview. You must open the Stove web payment page separately using the one-time URL included in the results to complete the payment, and after payment, you must manually call IAP_ConfirmPurchase to check the purchase results.
1WITH_WEBVIEWOpen the Stove web payment page via Stove Webview and complete the in-game purchase. After completing the payment within the Webview, you must manually call IAP_ConfirmPurchase to check the purchase result.
2WITH_WEBVIEW_AND_CONFIRM_RESULT(Recommended) Open the Stove web payment page via Stove Webview to make an in-game purchase. Once the payment is successfully completed, automatically call IAP_ConfirmPurchase to check the purchase result and return it.
3_MAX_COUNTNot used (This value indicates the end of the enumeration and is not a valid operation.)

Example

cpp
using namespace Stove::PCSDK::IAP;

StovePCPurchaseOption purchaseOption;
purchaseOption.SetOperation(StovePCPurchaseOperation::WITH_WEBVIEW_AND_CONFIRM_RESULT);

Notes

  • Unless the value is WITH_WEBVIEW_AND_CONFIRM_RESULT, you must call IAP_ConfirmPurchase after payment.
  • If you set WITH_WEBVIEW and WITH_WEBVIEW_AND_CONFIRM_RESULT, the WebviewMode / WebviewRect settings for StovePCPurchaseOption will be applied as well.

See Also


StovePCPurchaseOption

Kind Struct · Module IAP · Version 3.0.0.4

Description

IAP_StartPurchase() This structure specifies the execution mode (manual integration / Stove Webview integration / Stove Webview + automatic confirmation) and, when using Webview, the display location. It is passed as PurchaseOption to StovePCStartPurchaseParam.

The caller declares it directly on the stack and then populates it with a value using the Set*() method. Since it is a value type, no separate deallocation is required.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace IAP
        {
            struct StovePCPurchaseOption
            {
            public:
                StovePCPurchaseOperation GetOperation() const;
                void SetOperation(StovePCPurchaseOperation operation);
                Base::WebViewMode GetWebviewMode() const;
                void SetWebviewMode(Base::WebViewMode mode);
                void GetWebviewRect(int32_t* x, int32_t* y, int32_t* width, int32_t* height) const;
                void SetWebviewRect(int32_t x, int32_t y, int32_t width, int32_t height);
            };
        }
    }
}

Members

NameTypeAccessDescription
GetOperation() / SetOperation()StovePCPurchaseOperationReading and WritingIAP_StartPurchase() This is how it works when executed.
GetWebviewMode() / SetWebviewMode()WebViewModeReading and WritingThis type applies when using Stove Webview. It applies when Operation != DEFAULT.
GetWebviewRect() / SetWebviewRect()int32_t x, y, width, heightReading and WritingSets and retrieves the position and size (x, y, width, height) of the WebView used to display the Stove payment page all at once. Internally, this corresponds to the four fields webviewPosX, webviewPosY, webviewWidth, and webviewHeight. Applies when Operation != DEFAULT is set.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;
using namespace Stove::PCSDK::IAP;

StovePCPurchaseOption option;
option.SetOperation(StovePCPurchaseOperation::WITH_WEBVIEW_AND_CONFIRM_RESULT);
option.SetWebviewMode(WebViewMode::EXTERNAL);
option.SetWebviewRect(0, 0, 800, 600);

Notes

  • If you use WITH_WEBVIEW_AND_CONFIRM_RESULT (recommended), the SDK will automatically call IAP_ConfirmPurchase() after the payment is successfully completed to verify the purchase result.
  • If you use DEFAULT, you must open the payment page directly using the one-time URL included in the results and manually call IAP_ConfirmPurchase after the payment is complete.

See Also


StovePCPurchaseResult

Kind Struct · Module IAP · Version 3.0.0.4

Description

IAP_StartPurchase() represents the result of the call. It is passed as a value to the OnStartPurchaseFinished callback. Which field is populated depends on the Operation value in StovePCPurchaseOption.

  • If Operation is DEFAULT or WITH_WEBVIEW, then OneTimePaymentUrl is filled in.
  • Operation is WITH_WEBVIEW_AND_CONFIRM_RESULT, and if the payment is successful, Purchased, PurchasedProducts, and ChargeInfos will be filled in.

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

The arrays and their respective elements referenced by TransactionDetailNumbers, PurchasedProducts, and ChargeInfos are no longer valid once the callback has finished executing. Any values that need to be preserved must be copied (using the assignment operator or a copy constructor) within the callback.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace IAP
        {
            struct StovePCPurchaseResult
            {
            public:
                // To access members, use the getter methods listed in the "Fields" section below.
            };
        }
    }
}

Members

TransactionDetailNumbers, PurchasedProducts, and ChargeInfos are each managed as array-count pairs. Create*List(count) is assigned an array, Get*Count() returns the count, and Get*(index) returns the item at the index. The SDK populates these methods with values before passing the callback.

NameTypeAccessDescription
GetTransactionMasterNumber()int64_tReadThis is the unique transaction master number (settlement TID).
CreateTransactionDetailNumberList() / GetTransactionDetailNumbers() / SetTransactionDetailNumber() / GetTransactionDetailNumberCount()int64_t ArrayReading and WritingHere is the list of purchase detail numbers (purchased item TIDs) (transactionDetailNumbers) and quantities (transactionDetailNumberCount).
GetOneTimePaymentUrl()const wchar_t*ReadThis is a one-time payment URL. It is populated when Operation is DEFAULT or WITH_WEBVIEW.
GetPurchaseProgress()PurchaseProgressReadThe purchase is in progress.
IsPurchased()boolReadHere are the purchase results. Operation is WITH_WEBVIEW_AND_CONFIRM_RESULT; if the payment was successful, it is true; otherwise, it is false.
GetExtraData()const wchar_t*ReadThis is an echo of the ExtraData string passed when calling IAP_StartPurchase().
CreatePurchasedProductList() / GetPurchasedProduct() / SetPurchasedProduct() / GetPurchasedProductCount()StovePCPurchasedProduct ArrayReading and WritingHere is the list of purchased items (purchasedProducts) and their quantities (purchasedProductCount). Operation is WITH_WEBVIEW_AND_CONFIRM_RESULT and will be populated once the payment is successful.
CreateChargeInfoList() / GetChargeInfo() / SetChargeInfo() / GetChargeInfoCount()StovePCChargeInfo ArrayReading and WritingThis is a list of the items purchased (chargeInfos) and their quantities (chargeInfoCount).

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::IAP;

void __cdecl OnStartPurchaseFinished(CallbackResult callbackResult, StovePCPurchaseResult purchaseResult)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        PurchaseProgress progress = purchaseResult.GetPurchaseProgress();

        if (progress == PurchaseProgress::NEED_PAYMENT_WINDOW)
        {
            const wchar_t* paymentUrl = purchaseResult.GetOneTimePaymentUrl();
            // Please open the paymentUrl to complete the payment, and then call IAP_ConfirmPurchase().
        }
        else if (purchaseResult.IsPurchased())
        {
            uint32_t productCount = purchaseResult.GetPurchasedProductCount();
            for (uint32_t i = 0; i < productCount; ++i)
            {
                const StovePCPurchasedProduct* product = purchaseResult.GetPurchasedProduct(i);
                // Please copy and save only the values you need.
            }
        }
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

See Also


StovePCRefreshUserBenefits

Kind Struct · Module PCBang · Version 3.0.2

Description

This is a structure that receives a response via the benefit renewal callback (onRefreshBenefitsFinished) when PCBang_UserLogin() is called. It contains the user's benefit code and the remaining PC Bang premium time.

The SDK passes the value by filling in the callback argument. It is passed as a value type and does not require separate deallocation.

If the operation fails, neither field will be passed.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace PCBang
        {
            struct StovePCRefreshUserBenefits
            {
            public:
                PCBangPremium GetPremiumStatus() const;
                int32_t GetRemainTime() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
GetPremiumStatus()PCBangPremiumReadThis is a user benefit code. It will not be delivered if the transaction fails.
GetRemainTime()int32_tReadPC Bang Time remaining on your Premium subscription. This message will not be delivered if the delivery fails.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::PCBang;

void __cdecl OnRefreshBenefitsFinished(CallbackResult callbackResult, StovePCRefreshUserBenefits refreshUserBenefits)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        PCBangPremium premiumStatus = refreshUserBenefits.GetPremiumStatus();
        int32_t remainTime = refreshUserBenefits.GetRemainTime();

        // Please implement the logic to reflect the updated benefit information.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

Notes

  • This structure is passed to the benefit renewal callback (onRefreshBenefitsFinished) of PCBang_UserLogin().
  • The callback runs in the thread that called Base_RunCallback() and is called every 4 minutes.
  • This callback continues to be invoked even when in PCBANG_FREE (free franchise) status.

See Also


StovePCShopCategory

Kind Struct · Module IAP · Version 3.0.0.4

Description

Represents a single store category registered on the Stove platform. It is passed as an array to the OnFetchShopCategoriesFinished callback as a result of the IAP_FetchShopCategories() call.

This is a value type that the SDK populates and passes via a callback. It is not created directly by the caller.

The array and its individual elements passed to a callback are no longer valid once the callback has finished executing. Any values that need to be preserved must be copied (using the assignment operator or a copy constructor) within the callback.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace IAP
        {
            struct StovePCShopCategory
            {
            public:
                const wchar_t* GetCategoryId() const;
                const wchar_t* GetParentCategoryId() const;
                int32_t GetDisplayNumber() const;
                const wchar_t* GetName() const;
                int32_t GetDepth() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
GetCategoryId()const wchar_t*ReadThis is the category ID.
GetParentCategoryId()const wchar_t*ReadThis is the parent category ID.
GetDisplayNumber()int32_tReadThis is the order in which categories are displayed.
GetName()const wchar_t*ReadThis is the category name.
GetDepth()int32_tReadThis refers to the depth of the hierarchical structure.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::IAP;

void __cdecl OnFetchShopCategoriesFinished(CallbackResult callbackResult, StovePCShopCategory* shopCategorys, uint32_t shopCategorySize)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        for (uint32_t i = 0; i < shopCategorySize; ++i)
        {
            const wchar_t* categoryId = shopCategorys[i].GetCategoryId();
            const wchar_t* name = shopCategorys[i].GetName();

            // Please copy and save only the necessary values.
        }
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

  • The value obtained from GetCategoryId() can be passed directly to the category filter in StovePCFetchProductParam.
  • You can set up a category hierarchy as GetParentCategoryId() / GetDepth().

See Also


StovePCShutdown

Kind Struct · Module Base · Version 3.0.0.4

Description

Base_ShutdownNotification() This is the structure for the shutdown information received during an API call. It contains the time remaining until the user's shutdown (in minutes), the shutdown notification message, and the message display time (in seconds).

The SDK passes the value by populating the callback argument. The value is passed as a value type, and no separate deallocation is required.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            struct StovePCShutdown
            {
            public:
                int32_t GetInadvanceTimeInMinutes() const;
                const wchar_t* GetShutdownMessage() const;
                int32_t GetExposureTimeInSeconds() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
GetInadvanceTimeInMinutes()int32_tReadThis is the time remaining (in minutes) until the user's shutdown.
GetShutdownMessage()const wchar_t*ReadThis is a shutdown notification message.
GetExposureTimeInSeconds()int32_tReadThis is the message display time (in seconds).

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

void __cdecl OnShutdownFinishedCallback(CallbackResult callbackResult, StovePCShutdown shutdown)
{
    if (callbackResult.result.IsSuccessful())
    {
        int32_t inadvanceTimeInMinutes = shutdown.GetInadvanceTimeInMinutes();
        const wchar_t* shutdownMessage = shutdown.GetShutdownMessage();

        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

  • Base_ShutdownNotification() is not exclusive to South Korea. If an account is subject to the shutdown policy, this value is sent to the affected user regardless of their country.
  • The callback runs in the thread that called Base_RunCallback().

See Also


StovePCSignin

Kind Struct · Module Base · Version 3.0.0.4

Description

Base_GetSignin() This structure describes the sign-in information received during an API call. It contains information on whether identity verification or email verification has been completed, the country code of registration, the identification method (IDP) used during login, and the account type code.

Once the caller declares it on the stack and passes its address to Base_GetSignin(), the SDK populates the value. Since it is a value type, no separate deallocation is required.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            struct StovePCSignin
            {
            public:
                bool GetPersonVerify() const;
                bool GetEmailVerify() const;
                const wchar_t* GetNationality() const;
                const wchar_t* GetProviderCode() const;
                int GetAccountType() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
GetPersonVerify()boolReadThis refers to whether you have completed identity verification.
GetEmailVerify()boolReadThis refers to whether email verification has been completed.
GetNationality()const wchar_t*ReadThese are the country codes for countries registered on the Stove platform (ISO 3166-1 ALPHA-2 CODE).
GetProviderCode()const wchar_t*ReadThis is the IDP (Identity Provider) identifier. It refers to the authentication method used when logging in to Stove. Examples: SO (Stove email ID), FB (Facebook), TW (Twitter), NAVER (Naver), GP (Google), APPLE (Apple), SAO (one-time code), QR (QR code login), RT (automatic login via PC client), LINE, STEAM (Steam), etc.
GetAccountType()intReadThis is the account type code. Examples: 2 (Facebook), 3 (Twitter), 6 (Naver), 9 (Google+), 11 (Stove PC sign-up), 12 (Apple), 13 (LINE), 14 (LINE Games), 15 (Steam).

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

StovePCSignin signin;
Result result = Base_GetSignin(&signin);

if (result.IsSuccessful())
{
    bool personVerify = signin.GetPersonVerify();
    const wchar_t* providerCode = signin.GetProviderCode();

    // Please implement the logic for a successful outcome.
}
else
{
    // Please implement the logic for when a failure occurs.
}

Notes

  • GetProviderCode() and GetAccountType() represent the same login method using different schemes (alphabetic code / numeric code). Values other than those listed in the table above may be returned.

See Also


StovePCStartPurchaseParam

Kind Struct · Module IAP · Version 3.0.0.4

Description

This is the struct passed when calling the IAP_StartPurchase() and IAP_StartPurchaseEx() APIs. It contains the list of items to purchase, execution options, the service order number, and additional request data.

The caller declares it directly on the stack, fills it with values using the CreateOrderProduct() and Set*() methods, and passes its address as a function argument. Since it is a value type, no separate deallocation is required, but the internal array (products) is deallocated when this struct is destroyed.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace IAP
        {
            struct StovePCStartPurchaseParam
            {
            public:
                void CreateOrderProduct(uint32_t count);
                const StovePCOrderProduct* GetOrderProduct(int32_t index) const;
                void SetOrderProduct(int32_t index, const StovePCOrderProduct* product);
                uint32_t GetOrderProductCount() const;
                StovePCPurchaseOption GetPurchaseOption() const;
                void SetPurchaseOption(StovePCPurchaseOption option);
                const wchar_t* GetServiceTxnNo() const;
                void SetServiceTxnNo(const wchar_t* serviceTxnNo);
                const wchar_t* GetExtraData() const;
                void SetExtraData(const wchar_t* extraData);
            };
        }
    }
}

Members

The list of items to purchase (products) and their quantities (productsCount) are managed as array-quantity pairs. First, assign the array to CreateOrderProduct(count), then fill each index with an item using SetOrderProduct(index, product). GetOrderProductCount() returns productsCount, and GetOrderProduct(index) returns products[index].

NameTypeAccessDescription
CreateOrderProduct() / GetOrderProduct() / SetOrderProduct() / GetOrderProductCount()StovePCOrderProduct ArrayReading and WritingHere is the list of products to purchase (products) and their quantities (productsCount).
GetPurchaseOption() / SetPurchaseOption()StovePCPurchaseOptionReading and WritingThese are the API execution options.
GetServiceTxnNo() / SetServiceTxnNo()const wchar_t*Reading and WritingThis is the service order number. It is not required; you can set it as needed. The maximum length is 50 characters, and it cannot contain special characters. This order number is issued by the game and is transmitted via the NOTI server.
GetExtraData() / SetExtraData()const wchar_t*Reading and WritingThis is additional data for the request. It is not required; configure it as needed. It must be a string in JSON format with a maximum length of 500 characters. This is additional information that the game wishes to receive, and it is transmitted via the NOTI server.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::IAP;

StovePCOrderProduct orderProduct;
orderProduct.SetProductId(1234567890LL);
orderProduct.SetSalePrice(9900.0);
orderProduct.SetQuantity(1);

StovePCPurchaseOption option;
option.SetOperation(StovePCPurchaseOperation::WITH_WEBVIEW_AND_CONFIRM_RESULT);

StovePCStartPurchaseParam startPurchaseParam;
startPurchaseParam.CreateOrderProduct(1);
startPurchaseParam.SetOrderProduct(0, &orderProduct);
startPurchaseParam.SetPurchaseOption(option);
startPurchaseParam.SetExtraData(L"{\"characterId\":\"12345\"}");

IAP_StartPurchase(&startPurchaseParam, OnStartPurchaseFinished);

Notes

  • Calling SetOrderProduct() without first calling CreateOrderProduct() may result in undefined behavior. Please first assign the value using CreateOrderProduct() for each element in the array.
  • Depending on the value of Operation in PurchaseOption, the fields populated in the StovePCPurchaseResult callback will vary.

See Also


StovePCTermsOperation

Kind Enum · Module IAP · Version 3.0.0.4

Description

This value is set to StovePCTermsOption::SetOperation() when calling IAP_FetchTermsAgreement / IAP_FetchTermsAgreementEx. It determines whether to use Stove Webview.

Declaration

cpp
enum class StovePCTermsOperation : uint32_t
{
    DEFAULT = 0,
    WITH_WEBVIEW = 1,
    _MAX_COUNT
};

Enum Values

CodeNameDescription
0DEFAULTThis is the most basic action. It is used when manually integrating the terms and conditions agreement process without using Stove Webview. You must open the web page separately using the one-time URL included in the results to proceed with the terms and conditions agreement.
1WITH_WEBVIEWOpen a web page via Stove Webview and agree to the terms and conditions.
2_MAX_COUNTNot used (This value indicates the end of the enumeration and is not a valid operation.)

Example

cpp
using namespace Stove::PCSDK::IAP;

StovePCTermsOption options;
options.SetOperation(StovePCTermsOperation::WITH_WEBVIEW);

Notes

  • If you set it to WITH_WEBVIEW, the WebviewMode / WebviewRect settings in StovePCTermsOption will be applied as well.

See Also


StovePCTermsOption

Kind Struct · Module IAP · Version 3.0.0.4

Description

IAP_FetchTermsAgreement() This structure specifies the operating mode (manual integration / Stove WebView integration) and the display location when using WebView.

The caller declares it directly on the stack and then populates it with a value using the Set*() method. Since it is a value type, no separate deallocation is required.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace IAP
        {
            struct StovePCTermsOption
            {
            public:
                StovePCTermsOperation GetOperation() const;
                void SetOperation(StovePCTermsOperation operation);
                Base::WebViewMode GetWebviewMode() const;
                void SetWebviewMode(Base::WebViewMode mode);
                void GetWebviewRect(int32_t* x, int32_t* y, int32_t* width, int32_t* height) const;
                void SetWebviewRect(int32_t x, int32_t y, int32_t width, int32_t height);
            };
        }
    }
}

Members

NameTypeAccessDescription
GetOperation() / SetOperation()StovePCTermsOperationReading and WritingIAP_FetchTermsAgreement() This describes how it works when executed.
GetWebviewMode() / SetWebviewMode()WebViewModeReading and WritingThis type applies when using Stove Webview. It takes effect when Operation != DEFAULT.
GetWebviewRect() / SetWebviewRect()int32_t x, y, width, heightReading and WritingSets and retrieves the position and size (x, y, width, height) of the WebView used to display the Stove Terms of Service agreement page all at once. Internally, this corresponds to the four fields webviewPosX, webviewPosY, webviewWidth, and webviewHeight. Applies when Operation != DEFAULT is set.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;
using namespace Stove::PCSDK::IAP;

StovePCTermsOption option;
option.SetOperation(StovePCTermsOperation::WITH_WEBVIEW);
option.SetWebviewMode(WebViewMode::EXTERNAL);
option.SetWebviewRect(0, 0, 800, 600);

IAP_FetchTermsAgreement(&option, OnFetchTermsAgreementFinished);

Notes

  • If you use DEFAULT, you must open the Terms of Service page directly using the one-time URL included in the results.
  • If you need the result when the pop-up closes, please use IAP_FetchTermsAgreementEx.

See Also


StovePCToken

Kind Struct · Module Base · Version 3.0.0.4

Description

This is the Token structure returned by the callback when making a Base_AccessTokenRenewed() API call. It contains the AccessToken value and the remaining expiration time.

The SDK passes the value by populating the callback argument. The value is passed as a value type, so no explicit deallocation is required.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            struct StovePCToken
            {
            public:
                const wchar_t* GetAccessToken() const;
                int32_t GetExpireIn() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
GetAccessToken()const wchar_t*ReadThis is the Stove AccessToken value.
GetExpireIn()int32_tReadThis is the remaining expiration time (in seconds) for the AccessToken.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

void __cdecl OnRenewTokenFinishedCallback(CallbackResult callbackResult, StovePCToken token)
{
    if (callbackResult.result.IsSuccessful())
    {
        const wchar_t* accessToken = token.GetAccessToken();
        int32_t expireIn = token.GetExpireIn();

        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

  • It is passed as a callback argument to Base_AccessTokenRenewed(). This is not a function that issues a new AccessToken; its sole purpose is to receive the value issued at the time of renewal.
  • The callback runs in the thread that called Base_RunCallback().

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.

Base_GetTraceHint() This is a structure containing the identifiers used to track Stove platform logs that are passed during an API call. It contains the session ID, the reference (launcher or SGA) session ID, a UUID for identifying the web browser, the initial launch protocol, and the reference source type.

Once the caller declares it on the stack and passes its address to Base_GetTraceHint(), the SDK populates the value. Since it is a value type, no separate deallocation is required.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            struct StovePCTraceHint
            {
            public:
                const wchar_t* GetSessionId() const;
                const wchar_t* GetRefSessionId() const;
                const wchar_t* GetUUID() const;
                const wchar_t* GetServiceProtocol() const;
                const wchar_t* GetRefSourceType() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
GetSessionId()const wchar_t*ReadThis is the session ID that is issued each time the PCSDK is initialized.
GetRefSessionId()const wchar_t*ReadThis is the session ID issued each time a reference (launcher or SGA) is run.
GetUUID()const wchar_t*ReadThis is an ID issued to identify a web browser.
GetServiceProtocol()const wchar_t*ReadThis is the protocol used when the reference (launcher or SGA) is first launched.
GetRefSourceType()const wchar_t*ReadThis is the source type of a reference (launcher or SGA).

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

StovePCTraceHint traceHint;
Result result = Base_GetTraceHint(&traceHint);

if (result.IsSuccessful())
{
    const wchar_t* sessionId = traceHint.GetSessionId();

    // Please implement the logic for the success case.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • This value is used for Stove platform log tracking (such as responding to customer support inquiries). There is no need to interpret or process it separately within the game.

See Also


StovePCUser

Kind Struct · Module Base · Version 3.0.0.4

Description

Base_GetUser() This is a structure containing the user information received during an API call. It contains the Stove member ID, nickname, and gameUserId of the user who logged in via the launcher.

Once the caller declares it on the stack and passes its address to Base_GetUser(), the SDK fills in the value. Since it is a value type, no separate deallocation is required.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            struct StovePCUser
            {
            public:
                uint64_t GetMemberNumber() const;
                const wchar_t* GetNickname() const;
                uint64_t GetGameUserId() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
GetMemberNumber()uint64_tReadThis is the Stove member ID of the user logged in to the launcher. This will be deprecated; please use GetGameUserId() instead.
GetNickname()const wchar_t*ReadThis is the Stove username of the user logged in to the launcher.
GetGameUserId()uint64_tReadThis is the gameUserId of the user logged in to the launcher.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

StovePCUser user;
Result result = Base_GetUser(&user);

if (result.IsSuccessful())
{
    uint64_t gameUserId = user.GetGameUserId();
    const wchar_t* nickname = user.GetNickname();

    // Please implement the logic for when the operation is successful.
}
else
{
    // Please implement the logic for when an error occurs.
}

Notes

  • GetMemberNumber() is scheduled to be deprecated. Please use GetGameUserId() for new integrations.
  • It returns a valid value only when you are logged in.

See Also


StovePCVietnamAgeRatingInfo

Kind Struct · Module Base · Version 3.4.1

Description

This is a structure containing information about the Vietnamese age rating notifications received when making a Base_VietnamAgeRatingNotification() API call. It includes the overlay display status, type, size, and opacity; the game's age rating; the notification message; the message display location; and the language code.

The SDK passes the value by populating the callback argument. The value is passed as a value type, and no separate deallocation is required.

This is an API designed exclusively for Vietnam, and it operates solely using the launcher's SHOW/HIDE packets, without a timer.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            struct StovePCVietnamAgeRatingInfo
            {
            public:
                StoveOverlayState GetOverlayState() const;
                int GetOverlayType() const;
                float GetOverlayScale() const;
                float GetOverlayOpacity() const;
                int GetAgeRating() const;
                const wchar_t* GetAgeRatingMessage() const;
                float GetDisplayPositionX() const;
                float GetDisplayPositionY() const;
                const wchar_t* GetLanguage() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
GetOverlayState()StoveOverlayStateReadThe overlay is currently displayed.
GetOverlayType()intReadThis is the overlay type. 0 = black, 1 = white.
GetOverlayScale()floatReadThis is the overlay size (0.0 to 1.0).
GetOverlayOpacity()floatReadThis is the overlay opacity (0.0 to 1.0).
GetAgeRating()intReadThese are the game ratings. 0 = All Ages, 12 = Ages 12 and up, 16 = Ages 16 and up, 18 = Ages 18 and up.
GetAgeRatingMessage()const wchar_t*ReadThis is a message regarding age ratings.
GetDisplayPositionX()floatReadThis is the message display position (x-coordinate).
GetDisplayPositionY()floatReadThis is the message display position (y-coordinate).
GetLanguage()const wchar_t*ReadThis is a language code (e.g., "ko", "en", "ja", "vi", "zh-cn", "zh-tw", "th").

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

void __cdecl OnVietnamAgeRatingFinishedCallback(CallbackResult callbackResult, StovePCVietnamAgeRatingInfo vietnamAgeRatingInfo)
{
    if (callbackResult.result.IsSuccessful())
    {
        StoveOverlayState overlayState = vietnamAgeRatingInfo.GetOverlayState();
        int ageRating = vietnamAgeRatingInfo.GetAgeRating();

        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

Notes

  • The callback runs on the thread that called Base_RunCallback().
  • This is not a one-time callback; it may be called repeatedly in response to the launcher's SHOW/HIDE packets. You must distinguish between the show, hide, and expand states using GetOverlayState().
  • Reserved fields for future expansion (reserved1reserved10) do not have public getters and are therefore not included in the documentation.

See Also


StovePCVietnamOverimmersionInfo

Kind Struct · Module Base · Version 3.4.1

Description

This is a structure containing the Vietnam hyper-engagement information received when making a Base_VietnamOverimmersionNotification() API call. It includes the overlay display status, type, size, and opacity; the game’s age rating; the hyper-engagement warning message (including general and markup versions); the elapsed game time; the message display duration; the “Expand” animation duration; the message display position; and the language code.

The SDK passes the value by populating the callback argument. The value is passed as a value type, and no separate deallocation is required.

This is an API specifically for Vietnam.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            struct StovePCVietnamOverimmersionInfo
            {
            public:
                StoveOverlayState GetOverlayState() const;
                int GetOverlayType() const;
                float GetOverlayScale() const;
                float GetOverlayOpacity() const;
                int GetAgeRating() const;
                const wchar_t* GetOverimmersionMessage() const;
                const wchar_t* GetStyledMessage() const;
                int32_t GetElapsedTime() const;
                int32_t GetExposureTime() const;
                float GetExpandAnimationTime() const;
                float GetDisplayPositionX() const;
                float GetDisplayPositionY() const;
                const wchar_t* GetLanguage() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
GetOverlayState()StoveOverlayStateReadThe overlay is currently displayed.
GetOverlayType()intReadThis is an overlay type. 0 = black, 1 = white.
GetOverlayScale()floatReadThis is the overlay size (0.0 to 1.0).
GetOverlayOpacity()floatReadThis is the overlay opacity (0.0 to 1.0).
GetAgeRating()intReadThese are the game rating categories. 0 = All Ages, 12 = Ages 12 and up, 16 = Ages 16 and up, 18 = Ages 18 and up.
GetOverimmersionMessage()const wchar_t*ReadThis is a warning about excessive engagement.
GetStyledMessage()const wchar_t*ReadThis is a design-related warning message about excessive immersion, which includes markup tags such as <b> and <color=#RRGGBBAA>.
GetElapsedTime()int32_tReadThis is the elapsed game time (in minutes).
GetExposureTime()int32_tReadThis is the message display time (in seconds).
GetExpandAnimationTime()floatReadThis is the duration of the Expand animation (in seconds).
GetDisplayPositionX()floatReadThis is the message's display position (x-coordinate).
GetDisplayPositionY()floatReadThis is the y-coordinate of the message's display position.
GetLanguage()const wchar_t*ReadThis is a language code (e.g., "ko," "en," "ja," "vi," "zh-cn," "zh-tw," "th").

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::Base;

void __cdecl OnVietnamOverimmersionFinishedCallback(CallbackResult callbackResult, StovePCVietnamOverimmersionInfo vietnamOverimmersionInfo)
{
    if (callbackResult.result.IsSuccessful())
    {
        StoveOverlayState overlayState = vietnamOverimmersionInfo.GetOverlayState();
        const wchar_t* styledMessage = vietnamOverimmersionInfo.GetStyledMessage();

        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

Notes

  • The callback runs in the thread that called Base_RunCallback().
  • This is not a one-time callback; it is called periodically during gameplay. You must handle the show/hide/expand states indicated by GetOverlayState() accordingly.
  • GetOverimmersionMessage() is plain text, and GetStyledMessage() is design text that includes markup tags. Please choose the appropriate one for your needs.
  • Reserved fields for future expansion (reserved1 through reserved10) do not have public getters and are therefore not included in this documentation.

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 represents a single purchase record for which the user has requested a refund. It is passed as an array to the OnFetchVoidedPurchasesFinished callback as a result of the IAP_FetchVoidedPurchases() call.

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

The array and its individual elements passed to a callback are no longer valid once the callback has finished executing. Any values that need to be preserved must be copied (using the assignment operator or a copy constructor) within the callback.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace IAP
        {
            struct StovePCVoidedPurchase
            {
            public:
                int64_t GetTid() const;
                const wchar_t* GetMarketCode() const;
                const wchar_t* GetProductId() const;
                const wchar_t* GetMarketProductId() const;
                const wchar_t* GetUserId() const;
                int64_t GetCharacterNo() const;
                int64_t GetPurchaseMillis() const;
                int64_t GetVoidedMillis() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
GetTid()int64_tReadThis is the order number issued by the STOVE billing system.
GetMarketCode()const wchar_t*ReadThis is the market code.
GetProductId()const wchar_t*ReadThese are the product codes registered on the STOVE platform.
GetMarketProductId()const wchar_t*ReadThis is the product code listed on the marketplace.
GetUserId()const wchar_t*ReadThis is the user ID for the current game.
GetCharacterNo()int64_tReadThis is a unique key issued for each game character on the STOVE platform.
GetPurchaseMillis()int64_tReadThis is the payment time (epoch time in milliseconds) based on UTC+0.
GetVoidedMillis()int64_tReadThis is the time (epoch time in milliseconds) when the refund was processed, based on UTC+0.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::IAP;

void __cdecl OnFetchVoidedPurchasesFinished(CallbackResult callbackResult, StovePCVoidedPurchase* voidedPurchases, uint32_t voidedPurchaseSize)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        for (uint32_t i = 0; i < voidedPurchaseSize; ++i)
        {
            int64_t tid = voidedPurchases[i].GetTid();
            const wchar_t* productId = voidedPurchases[i].GetProductId();

            // Please copy and save only the values you need.
        }
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

  • It is passed only as the output of IAP_FetchVoidedPurchases.
  • StovePCVoidedPurchasesEx and IAP_FetchVoidedPurchasesEx(), which provided market-specific queries and additional fields (such as member ID and GUID), are no longer supported in the current SDK.

See Also


StovePCVoidedPurchasesEx

Kind Struct · Module IAP · Version 3.4.1 · Deprecated

Description

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

This represents a single purchase record for which the user has requested a refund. It is returned as an array in the OnFetchVoidedPurchasesExFinished callback following a call to IAP_FetchVoidedPurchasesEx(). Unlike StovePCVoidedPurchase, you can specify a market type when querying, and additional fields such as the member ID (MemberNo) and GUID are provided.

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

The array and its individual items passed to a callback are no longer valid once the callback has finished executing. Any values that need to be preserved must be copied (using the assignment operator or a copy constructor) within the callback.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace IAP
        {
            struct StovePCVoidedPurchasesEx
            {
            public:
                int64_t GetTid() const;
                wchar_t* GetMarketCode() const;
                int64_t GetMemberNo() const;
                wchar_t* GetGuid() const;
                int64_t GetCharacterNo() const;
                wchar_t* GetInserviceItemId() const;
                wchar_t* GetMarketItemId() const;
                wchar_t* GetMarketTid() const;
                wchar_t* GetMarketUserId() const;
                int64_t GetPurchaseDt() const;
                int64_t GetVoidedDt() const;
            };
        }
    }
}

Members

NameTypeAccessDescription
GetTid()int64_tReadThis is the order number issued by the STOVE billing system.
GetMarketCode()wchar_t*ReadThis is the market code.
GetMemberNo()int64_tReadThis is your STOVE platform member number.
GetGuid()wchar_t*ReadThe guid of the STOVE platform member.
GetCharacterNo()int64_tReadThis is a unique key issued for each game character (issued by STOVE).
GetInserviceItemId()wchar_t*ReadThis is the in-game item ID (same as ProductId).
GetMarketItemId()wchar_t*ReadThis is the item ID listed in the Marketplace (same as MarketProductId).
GetMarketTid()wchar_t*ReadThis is the Market order number. We do not offer a mobile Market; currently, we only offer STEAM.
GetMarketUserId()wchar_t*ReadThis is your Market account ID. We do not offer a mobile version of the Market; currently, it is available only on Steam.
GetPurchaseDt()int64_tReadThis is the settlement time (UTC).
GetVoidedDt()int64_tReadThis is the time (UTC) when the refund was processed.

Although the source code contains reserved fields (reserved1 through reserved5) for future expansion, they are not included in this documentation because they lack public getters.

Example

cpp
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::IAP;

void __cdecl OnFetchVoidedPurchasesExFinished(CallbackResult callbackResult, StovePCVoidedPurchasesEx* voidedPurchasesEx, uint32_t voidedPurchaseSize)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        for (uint32_t i = 0; i < voidedPurchaseSize; ++i)
        {
            int64_t tid = voidedPurchasesEx[i].GetTid();
            wchar_t* marketItemId = voidedPurchasesEx[i].GetMarketItemId();

            // Please copy and save only the values you need.
        }
        // Please implement the logic for a successful outcome.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

  • It is passed only as the output of IAP_FetchVoidedPurchasesEx.
  • Specify the market to query with the value StovePCVoidedPurchasesMarketType when calling IAP_FetchVoidedPurchasesEx().
  • Values for the mobile market-related fields (MarketTid, MarketUserId) are currently only available on the Steam Market.

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.

IAP_FetchVoidedPurchasesEx is the input value that specifies the market to query when making a call.

Declaration

cpp
enum class StovePCVoidedPurchasesMarketType : uint32_t
{
    ALL = 0,
    STEAM = 1,
    GOOGLE_PLAY = 2,
    APPLE_APP_STORE = 3
};

Enum Values

CodeNameDescription
0ALLView All Markets
1STEAMView Steam Market
2GOOGLE_PLAYGoogle Play Store Views
3APPLE_APP_STOREApple App Store Search

Example

cpp
using namespace Stove::PCSDK::IAP;

IAP_FetchVoidedPurchasesEx(StovePCVoidedPurchasesMarketType::STEAM, OnFetchVoidedPurchasesExFinished);

Notes

  • Due to the nature of the PC SDK, STEAM or ALL are typically used. GOOGLE_PLAY and APPLE_APP_STORE are used when retrieving refund history for accounts linked to other platforms.

See Also


View_AutoPopup

Kind Function · Module View · Version 3.0.0.4

Description

This function uses WebView to launch AutoPopup.

The pop-up feature must be initialized with View_Initialize or View_InitializeWithWndInfo before the call is made. If the call is made without initialization, the NOT_INITIALIZED result will be passed to the onFinished callback.

Declaration

cpp
void View_AutoPopup(Base::WebViewMode mode, OnPopupFinished onFinished);

Parameters

NameTypeRequiredDescription
modeBase::WebViewModeYModes for running WebView
onFinishedOnPopupFinishedYCallback function that receives the results of running WebView

Returns

None

Callback

cpp
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultCall Results

onFinished is called once when the popup has finished displaying or results are available. It runs in the thread that called Base_RunCallback(). If onFinished is nullptr, only the popup call is executed without a callback.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccess (All WebViews created successfully, or the WebView closed normally in onDestroy)x
17NOT_INITIALIZEDThe BaseSDK has not been initialized.x
33POPUP_NOT_CREATEDThe app terminated without creating any WebViews. It is passed to the onDestroy callback only once, but is not passed to the onFinished callback.x
80VIEWUI_NOT_INITIALIZEDThe internal WebView UI for displaying pop-ups has not been initialized.x
82WEBVIEW_CREATE_FAILFailed to create the WebView (including cases where only some pop-ups failed to create).x
83WEBVIEW_LOAD_URL_FAILThe WebView was unable to load the URL.x
84WEBVIEW_CLOSE_ALL_FAILBefore displaying a new pop-up, the system failed to close all previously open web views.x
85WEBVIEW_CLOSE_FAILFailed to close the WebView at onDestroy.x
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]
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
onFinished's callbackResultSDKIt is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately.

Example

cpp
using namespace Stove::PCSDK::View;

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

void ShowAutoPopup()
{
    View_AutoPopup(Base::WebViewMode::INTERNAL, OnAutoPopupFinished);
}

Notes

  • To receive the event when the pop-up closes, you must use View_AutoPopupEx.
  • Starting with v3.3.4, error codes (NO_POPUP_DATA, 87) have been added for cases where there is no popup data to display.
  • To close all pop-ups displayed on the screen at once, use View_CloseAllPopups.

Changelog

VersionChange
3.0.0.4First Published
3.3.4NO_POPUP_DATA(87) Add result code

See Also


View_AutoPopupEx

Kind Function · Module View · Version 3.3.4

Description

This function launches AutoPopup using WebView. It behaves identically to View_AutoPopup, but additionally provides the onDestroy callback, which is called when the popup's native resources have been completely released.

The pop-up feature must be initialized with View_Initialize or View_InitializeWithWndInfo before the call is made. If the call is made without initialization, the NOT_INITIALIZED result will be passed to the onFinished callback.

Declaration

cpp
void View_AutoPopupEx(Base::WebViewMode mode, OnPopupFinished onFinished, OnViewPopupDestroyFinished onDestroy);

Parameters

NameTypeRequiredDescription
modeBase::WebViewModeYModes for running WebView
onFinishedOnPopupFinishedYCallback function that receives the results of a WebView execution
onDestroyOnViewPopupDestroyFinishedNA callback function pointer that is called when the popup is closed

Returns

None

Callback

cpp
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
typedef void(__cdecl* OnViewPopupDestroyFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultCall Results

onFinished is called once when the popup finishes displaying or returns a result. onDestroy is called once when the popup's native resources have been completely released. Both callbacks run on the thread that called Base_RunCallback().

If the task terminates without a popup (WebView) being created (SDKResultCode::POPUP_NOT_CREATED), the legacy C++ interface intercepts this result internally, so onDestroy is not called.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccess (All WebViews were created successfully, or the WebView closed normally in onDestroy)x
17NOT_INITIALIZEDThe BaseSDK has not been initialized.x
33POPUP_NOT_CREATEDThe app terminated without creating any WebViews. The data is passed only once to the onDestroy callback and is not passed to the onFinished callback.x
80VIEWUI_NOT_INITIALIZEDThe internal WebView UI for displaying pop-ups has not been initialized.x
82WEBVIEW_CREATE_FAILFailed to create the WebView (including cases where only some pop-ups failed to create).x
83WEBVIEW_LOAD_URL_FAILThe WebView was unable to load the URL.x
84WEBVIEW_CLOSE_ALL_FAILBefore displaying a new pop-up, the system failed to close all previously open web views.x
85WEBVIEW_CLOSE_FAILFailed to close the WebView at onDestroy.x
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]
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary problem has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
onFinished/onDestroy's callbackResultSDKIt is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to manually free it.

Example

cpp
using namespace Stove::PCSDK::View;

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

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

void ShowAutoPopup()
{
    View_AutoPopupEx(Base::WebViewMode::INTERNAL, OnAutoPopupFinished, OnAutoPopupDestroyed);
}

Notes

  • onFinished and onDestroy are called at different times (when the result arrives and when the resource is released, respectively). Be sure not to confuse the two.
  • 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

This function closes all open pop-ups (WebViews). It targets pop-ups opened via View_AutoPopup, View_ManualPopup, View_NewsPopup, View_CouponPopup, and View_VerifyIdentificationPopup.

Declaration

cpp
Result View_CloseAllPopups();

Parameters

None

Returns

TypeDescription
ResultFunction call result. Check whether the call succeeded using result.IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccess (All open WebViews were closed successfully)x
80VIEWUI_NOT_INITIALIZEDThe internal WebView UI for displaying pop-ups has not been initialized.x
84WEBVIEW_CLOSE_ALL_FAILFailed to close all open WebViews.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::View;

void CloseAllViewPopups()
{
    Result result = View_CloseAllPopups();

    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 a popup that has already been displayed closes, the onFinished/onDestroy callbacks registered for each popup may be called.

See Also


View_CouponPopup

Kind Function · Module View · Version 3.0.0.4

Description

This function uses WebView to launch CouponPopup.

The pop-up feature must be initialized with View_Initialize or View_InitializeWithWndInfo before the call. If the call is made without initialization, the result NOT_INITIALIZED will be passed to the onFinished callback.

Declaration

cpp
void View_CouponPopup(Base::WebViewMode mode, OnPopupFinished onFinished);

Parameters

NameTypeRequiredDescription
modeBase::WebViewModeYModes for running WebView
onFinishedOnPopupFinishedYCallback function that receives the results of running WebView

Returns

None

Callback

cpp
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultCall Results

onFinished is called once after the popup has finished displaying or the results have been returned. It runs in the thread that called Base_RunCallback(). If onFinished is nullptr, only the popup call is performed without a callback.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccess (WebView creation successful, or WebView closed normally)x
5INVALID_PARAMYou are not currently connected to the World (game server).x
17NOT_INITIALIZEDThe BaseSDK has not been initialized.x
33POPUP_NOT_CREATEDThe app terminated without creating any WebViews. It is passed to the onDestroy callback only once, but is not passed to the onFinished callback.x
80VIEWUI_NOT_INITIALIZEDThe internal WebView UI for displaying pop-ups has not been initialized.x
82WEBVIEW_CREATE_FAILFailed to create a WebView (including cases where only some pop-ups failed to create).x
83WEBVIEW_LOAD_URL_FAILThe WebView was unable to load the URL.x
84WEBVIEW_CLOSE_ALL_FAILBefore displaying a new pop-up, the system failed to close all previously open web views.x
85WEBVIEW_CLOSE_FAILFailed to close the WebView at onDestroy.x
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]
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary problem has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For a complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
onFinished's callbackResultSDKIt is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately.

Example

cpp
using namespace Stove::PCSDK::View;

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

void ShowCouponPopup()
{
    View_CouponPopup(Base::WebViewMode::INTERNAL, OnCouponPopupFinished);
}

Notes

See Also


View_CouponPopupEx

Kind Function · Module View · Version 3.3.4

Description

This function launches CouponPopup using WebView. It behaves identically to View_CouponPopup and additionally provides the onDestroy callback, which is called when the popup's native resources have been completely released.

The pop-up feature must be initialized with View_Initialize or View_InitializeWithWndInfo before the call. If the call is made without initialization, the result NOT_INITIALIZED will be passed to the onFinished callback.

Declaration

cpp
void View_CouponPopupEx(Base::WebViewMode mode, OnPopupFinished onFinished, OnViewPopupDestroyFinished onDestroy);

Parameters

NameTypeRequiredDescription
modeBase::WebViewModeYModes for running WebView
onFinishedOnPopupFinishedYCallback function that receives the results of running WebView
onDestroyOnViewPopupDestroyFinishedNA callback function pointer that is called when the pop-up is closed

Returns

None

Callback

cpp
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
typedef void(__cdecl* OnViewPopupDestroyFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultCall Results

onFinished is called once when the popup finishes displaying or returns a result. onDestroy is called once when the popup's native resources are fully released. Both callbacks run on the thread that called Base_RunCallback().

If the task terminates without a popup (WebView) being created (SDKResultCode::POPUP_NOT_CREATED), the legacy C++ interface internally intercepts this result, so onDestroy is not called.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccess (WebView created successfully, or WebView closed normally)x
5INVALID_PARAMYou are not currently connected to the world (game server).x
17NOT_INITIALIZEDThe BaseSDK has not been initialized.x
33POPUP_NOT_CREATEDThe app exited without creating any WebViews. It is passed to the onDestroy callback only once, but is not passed to the onFinished callback.x
80VIEWUI_NOT_INITIALIZEDThe internal WebView UI for displaying pop-ups has not been initialized.x
82WEBVIEW_CREATE_FAILFailed to create the WebView (including cases where only some pop-ups failed to create).x
83WEBVIEW_LOAD_URL_FAILThe WebView was unable to load the URL.x
84WEBVIEW_CLOSE_ALL_FAILBefore displaying a new pop-up, the system failed to close all previously open web views.x
85WEBVIEW_CLOSE_FAILFailed to close the WebView at onDestroy.x
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]
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
onFinished/onDestroy's callbackResultSDKIt is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately.

Example

cpp
using namespace Stove::PCSDK::View;

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

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

void ShowCouponPopup()
{
    View_CouponPopupEx(Base::WebViewMode::INTERNAL, OnCouponPopupFinished, OnCouponPopupDestroyed);
}

Notes

  • onFinished and onDestroy are called at different times (when the result arrives and when the resource is released, respectively). Be sure not to confuse the two.
  • 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.

This function retrieves a one-time key to be used with the "Web Open in Game" feature.

This should only be used when you need to display the Stove Community or Customer Support page in an external browser.

Declaration

cpp
void View_FetchWebOpenKey(OnFetchWebOpenKeyFinished onFinished);

Parameters

NameTypeRequiredDescription
onFinishedOnFetchWebOpenKeyFinishedYA callback function that receives the results of the FetchWebOpenKey execution

Returns

None

Callback

cpp
typedef void(__cdecl* OnFetchWebOpenKeyFinished)(CallbackResult callbackResult, const wchar_t* key);
NameTypeDescription
callbackResultCallbackResultCall Results
keyconst wchar_t*One-time key used for the "Web Open in Game" call

onFinished is called once after the key lookup is complete. It runs in the thread that called Base_RunCallback(). onFinished is required. If nullptr is passed, it is handled by INVALID_PARAM.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
17NOT_INITIALIZEDThe BaseSDK has not been initialized.x
25RESPONSE_VALUE_IS_NULLThe value required for the server response is missing.OThe network connection is unstable. Please check your network status and try again. [OK]
26RESPONSE_INVALID_VALUE_FORMATThe server response format (JSON parsing/field validation) is incorrect.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 during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
onFinished's callbackResultSDKIt is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately.
onFinished's keySDKDo not unwrap. Since the callback becomes invalid once it returns, you must copy it within the callback if you intend to use it later.

Example

cpp
using namespace Stove::PCSDK::View;

void __cdecl OnFetchWebOpenKeyFinishedCallback(CallbackResult callbackResult, const wchar_t* key)
{
    if (callbackResult.GetResult().IsSuccessful())
    {
        // Please implement the logic to open an external browser using the key.
        // Since the key will be invalidated once this callback finishes, you should make a copy of it within this callback if necessary.
    }
    else
    {
        // Please implement the logic for when a failure occurs.
    }
}

void FetchWebOpenKey()
{
    View_FetchWebOpenKey(OnFetchWebOpenKeyFinishedCallback);
}

Notes

  • For general in-game WebView display, you should use a popup function such as View_AutoPopup instead of this function. Use this function only when you need to open a browser in a separate window.
  • This function is asynchronous.

See Also


View_GetVersion

Kind Function · Module View · Version 3.4.1

Description

This function retrieves version information for the pop-up feature. It fills the version buffer with the version string and returns it.

The current implementation directly calls the version lookup function of the BaseSDK, which is integrated into a single binary. In other words, the version string returned by this function is not a version specific to the ViewSDK, but rather the overall version of the integrated PCSDK.

Declaration

cpp
Result View_GetVersion(__out wchar_t* version, uint32_t length);

Parameters

NameTypeRequiredDescription
versionwchar_t* (out)YA buffer to receive version information. Allocated by the caller.
lengthuint32_tYversion Length of the array

Returns

TypeDescription
ResultFunction call result. Check whether the call succeeded using result.IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
251PCSDK_DLL_NOT_FOUNDThe executable file path could not be found.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
versionCallerThis is a buffer allocated by the caller. The SDK only fills the buffer; it does not own or deallocate it.

Example

cpp
using namespace Stove::PCSDK::View;

void PrintViewSDKVersion()
{
    wchar_t version[64] = {};
    Result result = View_GetVersion(version, 64);

    if (result.IsSuccessful())
    {
        // If successful, please implement the logic that uses the version buffer.
    }
    else
    {
        // Please implement the logic for when an error occurs.
    }
}

Notes

  • This function is synchronous and does not accept callbacks.
  • The returned version string may be the same as the BaseSDK value, depending on the integration build policy.

See Also


View_Initialize

Kind Function · Module View · Version 3.0.0.4

Description

This function resets the pop-up functionality. It must be called before using pop-up-related features such as View_AutoPopup and View_ManualPopup.

If you need to pass the handle of the main window that will serve as the parent window for the Internal Style pop-up, you should use View_InitializeWithWndInfo instead of this function.

Declaration

cpp
Result View_Initialize();

Parameters

None

Returns

TypeDescription
ResultFunction call result. Check result.IsSuccessful() to determine if the call was successful.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
16BASE_NOT_INITIALIZEDThe BaseSDK has not been initialized. You must first call Base_Initialize (or Base_InitializeEx).x
18ALREADY_INITIALIZEDInitialization of the pop-up feature was attempted again while already initialized.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the internal WebView UI to display the pop-up.x
251PCSDK_DLL_NOT_FOUNDThe executable file path could not be found during the internal version check.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::View;

void InitializeView()
{
    Result result = View_Initialize();

    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.
  • If you need the parent window handle for the Internal Style pop-up, you should use View_InitializeWithWndInfo instead.
  • When you are finished using the pop-up feature, you must release the resource using View_UnInitialize.

See Also


View_InitializeWithWndInfo

Kind Function · Module View · Version 3.3.3

Description

This function resets the popup functionality. It behaves the same as View_Initialize, but additionally accepts the handle (HWND) of the main window that will serve as the parent window for the Internal Style popup.

If you do not plan to use the "Internal Style" pop-up, you may use View_Initialize.

Declaration

cpp
Result View_InitializeWithWndInfo(const void* mainWndHandle);

Parameters

NameTypeRequiredDescription
mainWndHandleconst void* (HWND)YThe handle of the main window that will serve as the parent window for the "Internal Style" pop-up

Returns

TypeDescription
ResultFunction call result. Check whether the call succeeded using result.IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
16BASE_NOT_INITIALIZEDBaseSDK has not been initialized. You must first call Base_Initialize (or Base_InitializeEx).x
18ALREADY_INITIALIZEDInitialization of the pop-up feature was attempted again while already initialized.x
80VIEWUI_NOT_INITIALIZEDFailed to initialize the internal WebView UI to display the pop-up.x
251PCSDK_DLL_NOT_FOUNDThe executable file path could not be found during the internal version check.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OThere was a temporary issue. Please try again. [OK]

For the complete list, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::View;

void InitializeView(void* mainWndHandle)
{
    Result result = View_InitializeWithWndInfo(mainWndHandle);

    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.
  • mainWndHandle is a window handle owned by the caller. The SDK neither owns nor releases this handle.
  • When you are finished using the pop-up feature, you must release the resources by calling View_UnInitialize.

See Also


View_ManualPopup

Kind Function · Module View · Version 3.0.0.4

Description

This function uses WebView to trigger a ManualPopup for the specified resourceKey.

The pop-up feature must be initialized with View_Initialize or View_InitializeWithWndInfo before it is called. If it is called without being initialized, the result NOT_INITIALIZED will be passed to the onFinished callback.

Declaration

cpp
void View_ManualPopup(const wchar_t* resourceKey, Base::WebViewMode mode, OnPopupFinished onFinished);

Parameters

NameTypeRequiredDescription
resourceKeyconst wchar_t*YResourceKey for ManualPopup
modeBase::WebViewModeYModes for Running WebView
onFinishedOnPopupFinishedYCallback function that receives the results of running WebView

Returns

None

Callback

cpp
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultCall Results

onFinished is called once after the popup has finished displaying or results have been returned. It runs in the thread that called Base_RunCallback(). If onFinished is nullptr, only the popup call is executed without a callback.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccess (WebView creation successful, or WebView closed normally)x
5INVALID_PARAMresourceKey is an empty string.x
17NOT_INITIALIZEDThe BaseSDK has not been initialized.x
33POPUP_NOT_CREATEDThe app terminated without creating any WebViews. The onDestroy callback is triggered only once, while the onFinished callback is not triggered at all.x
80VIEWUI_NOT_INITIALIZEDThe internal WebView UI for displaying pop-ups has not been initialized.x
82WEBVIEW_CREATE_FAILFailed to create the WebView (including cases where only some pop-ups failed to create).x
83WEBVIEW_LOAD_URL_FAILThe WebView was unable to load the URL.x
84WEBVIEW_CLOSE_ALL_FAILBefore displaying a new pop-up, the system failed to close all previously open web views.x
85WEBVIEW_CLOSE_FAILFailed to close the WebView at onDestroy.x
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]
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
onFinished's callbackResultSDKIt is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately.

Example

cpp
using namespace Stove::PCSDK::View;

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

void ShowManualPopup(const wchar_t* resourceKey)
{
    View_ManualPopup(resourceKey, Base::WebViewMode::INTERNAL, OnManualPopupFinished);
}

Notes

  • To receive the event when the pop-up closes, you must use View_ManualPopupEx.
  • Starting with v3.3.4, error codes (NO_POPUP_DATA, 87) have been added for cases where there is no pop-up data to display.
  • To close all pop-ups displayed on the screen at once, use View_CloseAllPopups.

Changelog

VersionChange
3.0.0.4First Published
3.3.4NO_POPUP_DATA(87) Add result code

See Also


View_ManualPopupEx

Kind Function · Module View · Version 3.3.4

Description

This function uses WebView to trigger a ManualPopup for the specified resourceKey. It behaves identically to View_ManualPopup and additionally provides the onDestroy callback, which is called when the popup’s native resources have been completely released.

The pop-up feature must be initialized with View_Initialize or View_InitializeWithWndInfo before the call is made. If the call is made before initialization, the result NOT_INITIALIZED will be passed to the onFinished callback.

Declaration

cpp
void View_ManualPopupEx(const wchar_t* resourceKey, Base::WebViewMode mode,
                        OnPopupFinished onFinished, OnViewPopupDestroyFinished onDestroy);

Parameters

NameTypeRequiredDescription
resourceKeyconst wchar_t*YResourceKey for ManualPopup
modeBase::WebViewModeYModes for running WebView
onFinishedOnPopupFinishedYCallback function that receives the results of running WebView
onDestroyOnViewPopupDestroyFinishedNA callback function pointer that is called when the pop-up is closed

Returns

None

Callback

cpp
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
typedef void(__cdecl* OnViewPopupDestroyFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultCall Results

onFinished is called once when the popup has finished displaying or when the result is 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().

If the task terminates without a popup (WebView) being created (SDKResultCode::POPUP_NOT_CREATED), the legacy C++ interface intercepts this result internally, so onDestroy is not called.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccess (WebView created successfully, or WebView closed normally)x
5INVALID_PARAMresourceKey is an empty string.x
17NOT_INITIALIZEDThe BaseSDK has not been initialized.x
33POPUP_NOT_CREATEDThe app terminated without creating any WebViews. The onDestroy callback is called only once, and the onFinished callback is not called.x
80VIEWUI_NOT_INITIALIZEDThe internal WebView UI for displaying pop-ups has not been initialized.x
82WEBVIEW_CREATE_FAILFailed to create the WebView (including cases where only some pop-ups failed to create).x
83WEBVIEW_LOAD_URL_FAILThe WebView was unable to load the URL.x
84WEBVIEW_CLOSE_ALL_FAILBefore displaying a new pop-up, the system failed to close all previously open web views.x
85WEBVIEW_CLOSE_FAILFailed to close the WebView at onDestroy.x
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]
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OThere was a temporary issue. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
onFinished/onDestroy's callbackResultSDKIt is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately.

Example

cpp
using namespace Stove::PCSDK::View;

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

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

void ShowManualPopup(const wchar_t* resourceKey)
{
    View_ManualPopupEx(resourceKey, Base::WebViewMode::INTERNAL, OnManualPopupFinished, OnManualPopupDestroyed);
}

Notes

  • onFinished and onDestroy are called at different times (when the result is received and when the resource is released, respectively). Be sure not to confuse the two.
  • 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

This function launches NewsPopup using WebView.

The pop-up feature must be initialized with View_Initialize or View_InitializeWithWndInfo before the call. If the call is made without initialization, the result NOT_INITIALIZED will be passed to the onFinished callback.

Declaration

cpp
void View_NewsPopup(Base::WebViewMode mode, OnPopupFinished onFinished);

Parameters

NameTypeRequiredDescription
modeBase::WebViewModeYModes for running WebView
onFinishedOnPopupFinishedYCallback function that receives the results of running WebView

Returns

None

Callback

cpp
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultCall Results

onFinished is passed once when the popup finishes displaying or when the results are returned. It runs in the thread that called Base_RunCallback(). If onFinished is nullptr, only the popup call is executed without a callback.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccess (WebView created successfully, or WebView closed normally)x
17NOT_INITIALIZEDThe BaseSDK has not been initialized.x
33POPUP_NOT_CREATEDThe app terminated without creating any web views. It is passed to the onDestroy callback only once, but is not passed to the onFinished callback.x
80VIEWUI_NOT_INITIALIZEDThe internal WebView UI for displaying pop-ups has not been initialized.x
82WEBVIEW_CREATE_FAILFailed to create the WebView (including cases where only some pop-ups failed to create).x
83WEBVIEW_LOAD_URL_FAILThe WebView was unable to load the URL.x
84WEBVIEW_CLOSE_ALL_FAILBefore displaying a new pop-up, the system failed to close all previously open web views.x
85WEBVIEW_CLOSE_FAILFailed to close the WebView at onDestroy.x
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]
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
onFinished's callbackResultSDKIt is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately.

Example

cpp
using namespace Stove::PCSDK::View;

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

void ShowNewsPopup()
{
    View_NewsPopup(Base::WebViewMode::INTERNAL, OnNewsPopupFinished);
}

Notes

  • To receive the event that occurs when the pop-up closes, you must use View_NewsPopupEx.
  • Starting with v3.3.4, error codes (NO_POPUP_DATA, 87) have been added for cases where there is no pop-up data to display.
  • To close all pop-ups displayed on the screen at once, use View_CloseAllPopups.

Changelog

VersionChange
3.0.0.4First Published
3.3.4NO_POPUP_DATA(87) Add result code

See Also


View_NewsPopupEx

Kind Function · Module View · Version 3.3.4

Description

This function launches NewsPopup using WebView. It behaves identically to View_NewsPopup, but also provides an additional callback, onDestroy, which is called when the popup’s native resources have been fully released.

The pop-up feature must be initialized with View_Initialize or View_InitializeWithWndInfo before the call is made. If the call is made without initializing it, the NOT_INITIALIZED result will be passed to the onFinished callback.

Declaration

cpp
void View_NewsPopupEx(Base::WebViewMode mode, OnPopupFinished onFinished, OnViewPopupDestroyFinished onDestroy);

Parameters

NameTypeRequiredDescription
modeBase::WebViewModeYModes for Running WebView
onFinishedOnPopupFinishedYCallback function that receives the results of running WebView
onDestroyOnViewPopupDestroyFinishedNA callback function pointer that is called when the pop-up is closed

Returns

None

Callback

cpp
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
typedef void(__cdecl* OnViewPopupDestroyFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultCall Results

onFinished is called once when the popup finishes displaying or returns a result. onDestroy is called once when the popup's native resources are fully released. Both callbacks run on the thread that called Base_RunCallback().

If the task terminates without a popup (WebView) being created (SDKResultCode::POPUP_NOT_CREATED), the legacy C++ interface internally intercepts this result, so onDestroy is not called.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccess (WebView created successfully, or WebView closed normally)x
17NOT_INITIALIZEDThe BaseSDK has not been initialized.x
33POPUP_NOT_CREATEDThe app terminated without creating any WebViews. The onDestroy callback is called only once, and the onFinished callback is not called at all.x
80VIEWUI_NOT_INITIALIZEDThe internal WebView UI for displaying pop-ups has not been initialized.x
82WEBVIEW_CREATE_FAILFailed to create the WebView (including cases where only some pop-ups failed to create).x
83WEBVIEW_LOAD_URL_FAILThe WebView was unable to load the URL.x
84WEBVIEW_CLOSE_ALL_FAILBefore displaying a new pop-up, the system failed to close all previously open web views.x
85WEBVIEW_CLOSE_FAILFailed to close the WebView at onDestroy.x
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]
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
onFinished/onDestroy's callbackResultSDKIt is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately.

Example

cpp
using namespace Stove::PCSDK::View;

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

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

void ShowNewsPopup()
{
    View_NewsPopupEx(Base::WebViewMode::INTERNAL, OnNewsPopupFinished, OnNewsPopupDestroyed);
}

Notes

  • onFinished and onDestroy are called at different times (when the result arrives and when the resource is released, respectively). Be sure not to confuse the two.
  • 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

This function prevents a specified popup ID from being displayed again for a certain period of time.

Declaration

cpp
void View_SetPopupDisallowed(const StovePCPopupDisallowed* disallowed, OnSetPopupDisallowedFinished onSetPopupDisallowed);

Parameters

NameTypeRequiredDescription
disallowedconst StovePCPopupDisallowed*YInformation Required When Not Displaying Pop-ups
onSetPopupDisallowedOnSetPopupDisallowedFinishedNCallback function that receives the results of the PopupDisallowed execution

Returns

None

Callback

cpp
typedef void(__cdecl* OnSetPopupDisallowedFinished)(CallbackResult callbackResult);
NameTypeDescription
callbackResultCallbackResultCall Results

onSetPopupDisallowed is passed once after configuration is complete. It runs in the thread that called Base_RunCallback(). If onSetPopupDisallowed is nullptr, only the configuration is performed without a callback.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccessx
1FAILFailed to save the configuration information to a local file.x
17NOT_INITIALIZEDThe BaseSDK has not been initialized.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
disallowedCallerCreated and owned by the caller. Since the SDK copies and uses only the necessary values, it can be destroyed as soon as the call returns.
onSetPopupDisallowed's callbackResultSDKIt is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it manually.

Example

cpp
using namespace Stove::PCSDK::View;

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

void DisallowPopupForDays(uint32_t popupId, uint32_t days)
{
    StovePCPopupDisallowed disallowed;
    disallowed.SetPopupId(popupId);
    disallowed.SetDays(days);

    View_SetPopupDisallowed(&disallowed, OnSetPopupDisallowedFinishedCallback);
}

Notes

  • This function is asynchronous.
  • disallowed is referenced only within this function, so it is safe to destroy it immediately after the function call returns.

See Also


View_UnInitialize

Kind Function · Module View · Version 3.0.0.4

Description

This function releases the resources used by the popup feature. Call it when you are finished using the popup feature after initializing it with View_Initialize or View_InitializeWithWndInfo.

Declaration

cpp
Result View_UnInitialize();

Parameters

None

Returns

TypeDescription
ResultFunction call result. Check whether the call succeeded using result.IsSuccessful().

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccess (including cases where the IAP still uses the shared WebView UI and therefore skips the actual unlock process)x
17NOT_INITIALIZEDThe pop-up feature was called before it had been initialized.x
81VIEWUI_UNINIT_FAILEDFailed to close the internal WebView UI.x
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]

For the complete list, see SDKResultCode.

Example

cpp
using namespace Stove::PCSDK::View;

void UninitializeView()
{
    Result result = View_UnInitialize();

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

Notes

See Also


View_VerifyIdentificationPopup

Kind Function · Module View · Version 3.3.4

Description

This function uses WebView to display an identity verification pop-up. If compareIdentifier is true, verification is performed using SDI; if it is false, simKey is provided via the onDestroy callback, and verification is performed directly through the game server.

The pop-up feature must be initialized with View_Initialize or View_InitializeWithWndInfo before the call is made. If the call is made without initialization, the result NOT_INITIALIZED will be passed to the onFinished callback.

Starting with v3.4.1, this function is restricted to South Korea (KR). Calling it from countries other than South Korea will result in an error.

Declaration

cpp
void View_VerifyIdentificationPopup(bool compareIdentifier, Base::WebViewMode mode,
                                    OnPopupFinished onFinished, OnVerifyIdentificationPopupDestroyFinished onDestroy);

Parameters

NameTypeRequiredDescription
compareIdentifierboolYWhether verification is performed using SDI. If false, simKey is provided as onDestroy.
modeBase::WebViewModeYModes for running WebView
onFinishedOnPopupFinishedYCallback function that receives the results of running WebView
onDestroyOnVerifyIdentificationPopupDestroyFinishedNA pointer to the callback function that is called when the VerifyIdentificationPopup popup is closed

Returns

None

Callback

cpp
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
typedef void(__cdecl* OnVerifyIdentificationPopupDestroyFinished)(CallbackResult callbackResult, const wchar_t* simKey);
NameTypeDescription
callbackResultCallbackResultCall Results
simKeyconst wchar_t*SimKey, used to verify identity verification results via the platform API (rather than the SDI method); must be sent to the game server

onFinished is called once when the popup closes or the result is returned. onDestroy is called once when the popup's native resources are fully released. Both callbacks run on the thread that called Base_RunCallback().

If the task terminates without a popup (WebView) being created (SDKResultCode::POPUP_NOT_CREATED), the legacy C++ interface internally intercepts this result, so onDestroy is not called.

Error Codes

CodeNameDescriptionShow to UserIn-Game Message
0SUCCESSSuccess (WebView created successfully, or WebView closed normally)x
17NOT_INITIALIZEDThe BaseSDK has not been initialized.x
31NOT_SUPPORTED_COUNTRYThe logged-in user's GDS country is not South Korea (kr). This pop-up is for South Korea only.x
33POPUP_NOT_CREATEDThe app has exited without creating any WebViews (including cases where it exited due to country restrictions). It is passed only once to the onDestroy callback and is not passed to the onFinished callback.x
80VIEWUI_NOT_INITIALIZEDThe internal WebView UI for displaying pop-ups has not been initialized.x
82WEBVIEW_CREATE_FAILFailed to create the WebView (including cases where only some pop-ups failed to create).x
83WEBVIEW_LOAD_URL_FAILThe WebView was unable to load the URL.x
84WEBVIEW_CLOSE_ALL_FAILBefore displaying the new pop-up, the system failed to close all previously open web views.x
85WEBVIEW_CLOSE_FAILFailed to close the WebView at onDestroy.x
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]
253UNMANAGED_EXCEPTIONAn exception occurred during execution.OA temporary issue has occurred. Please try again. [OK]
254MANAGED_EXCEPTIONAn exception occurred during execution.OThere was a temporary issue. Please try again. [OK]

For the complete list, see SDKResultCode.

Memory Management

ObjectOwnerRelease
onFinished/onDestroy's callbackResultSDKIt is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately.
onDestroy's simKeySDKDo not unwrap. Since the callback becomes invalid once it returns, you must copy it within the callback if you want to use it later.

Example

cpp
using namespace Stove::PCSDK::View;

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

void __cdecl OnVerifyIdentificationPopupDestroyed(CallbackResult callbackResult, const wchar_t* simKey)
{
    // Please implement the logic to send the simKey to the game server.
    // Since simKey is invalidated once this callback finishes, you should make a copy of it within this callback if necessary.
}

void ShowVerifyIdentificationPopup()
{
    View_VerifyIdentificationPopup(false, Base::WebViewMode::INTERNAL,
                                    OnVerifyIdentificationPopupFinished, OnVerifyIdentificationPopupDestroyed);
}

Notes

  • The simKey field in onDestroy is populated with a valid value only when compareIdentifier is false.
  • To close all pop-ups displayed on the screen at once, use View_CloseAllPopups.

Changelog

VersionChange
3.3.4First Published
3.4.1Restricted to South Korea (KR) only. An error will be returned if called from countries other than South Korea.

See Also


WebViewMode

Kind Enum · Module Base · Version 3.0.0.4

Description

This is a value for the WebView execution mode. Although BaseSDKEnumerations.h is commented as "enum value for language settings," the actual values (EXTERNAL/INTERNAL) and their usage pertain to the WebView execution mode.

Although it is defined in Stove::PCSDK::Base, it is actually used as the WebviewMode field (of type Base::WebViewMode) in various structures within the payment functionality, as well as an input parameter for the pop-up API series.

Declaration

cpp
namespace Stove
{
    namespace PCSDK
    {
        namespace Base
        {
            enum class WebViewMode : uint32_t
            {
                EXTERNAL = 0,
                INTERNAL,
                _MAX_COUNT
            };
        }
    }
}

Enum Values

CodeNameDescription
0EXTERNALWebView runs in External Mode.
1INTERNALWebView runs in Internal Mode.
2_MAX_COUNTNot used. This value indicates the end of WebViewMode and is not a valid value.

Example

cpp
using namespace Stove::PCSDK::Base;
using namespace Stove::PCSDK::IAP;

StovePCPurchaseOption option;
option.SetWebviewMode(WebViewMode::EXTERNAL);

Notes

  • Stove::PCSDK::Base Although it is declared in the namespace, it is not part of the SDK's own API; rather, it is used as WebviewMode in the payment functionality structure and as Base::WebViewMode in the pop-up-related APIs.
  • _MAX_COUNT is a sentinel value indicating the number of values and must not be passed to the API.

See Also