- 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
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
void Base_AccessTokenRenewed(OnRenewTokenFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
onFinished | OnRenewTokenFinished | Y | This is a callback function that receives the newly issued AccessToken. |
Returns
None
Callback
typedef void(__cdecl* OnRenewTokenFinished)(CallbackResult callbackResult, StovePCToken token);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This is the callback result. |
token | StovePCToken | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | onFinished is nullptr. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | There was a temporary issue. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary problem has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
Callback callbackResult | Callback Scope | This is a local object passed by value. There is no need to free it separately. |
Callback token (StovePCToken) | Callback Scope | Since 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
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
Result Base_GetAccessToken(wchar_t* accessToken, uint32_t length);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
accessToken | wchar_t* | Y | This is a buffer for retrieving a valid AccessToken. |
length | uint32_t | Y | accessToken is the length of the array. |
Returns
| Type | Description |
|---|---|
Result | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | accessToken is nullptr, or length is 0, or the buffer is too small, so the resulting string was truncated. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 19 | INVALID_ACCESS_TOKEN | The AccessToken you have is invalid (e.g., expired). | O | Your login session has expired. Please close the game and restart it. [OK] |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary problem has occurred. Please try again. [OK] |
If you receive the code below, you must exit the game. The game cannot proceed normally.
19INVALID_ACCESS_TOKEN— You must restart the game after it closes.
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
accessToken Buffer | Caller | Since the buffer was allocated by the caller, the caller manages it. |
Example
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
Result Base_GetGds(StovePCGds* gds);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
gds | StovePCGds* | Y | This is a variable that will store the logged-in user's country information. |
Returns
| Type | Description |
|---|---|
Result | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | gds is nullptr. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
gds | Caller | Since the caller allocated the object on the stack, the caller manages it. The SDK only populates the internal fields. |
Example
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()istrue, 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
void Base_GetOverImmersion(OnOverImmersionFinished callback);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
callback | OnOverImmersionFinished | Y | This is a callback function that receives the results of the anti-addiction measures. |
Returns
None
Callback
typedef void(__cdecl* OnOverImmersionFinished)(CallbackResult callbackResult, StovePCOverImmersion overImmersion);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This is the callback result. |
overImmersion | StovePCOverImmersion | This 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | callback is nullptr. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 31 | NOT_SUPPORTED_COUNTRY | The logged-in user's GDS country is not South Korea (kr). | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
Callback callbackResult | Callback Scope | This is a local object passed by value. There is no need to free it separately. |
Callback overImmersion (StovePCOverImmersion) | Callback Scope | Since 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
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
- This API is scheduled to be deprecated. You should use Base_OverImmersionNotification in new code.
- This API is for use in Korea only.
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
void Base_GetRenewToken(OnRenewTokenFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
onFinished | OnRenewTokenFinished | Y | This is the callback function that receives the newly issued AccessToken. |
Returns
None
Callback
typedef void(__cdecl* OnRenewTokenFinished)(CallbackResult callbackResult, StovePCToken token);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This is the callback result. |
token | StovePCToken | Here 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | onFinished is nullptr. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
Callback callbackResult | Callback Scope | This is a local object passed by value. You do not need to free it separately. |
Callback token (StovePCToken) | Callback Scope | Since 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
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
- This API is scheduled to be deprecated. You should use Base_AccessTokenRenewed in new code.
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
void Base_GetShutdown(OnShutdownFinished callback);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
callback | OnShutdownFinished | Y | This is a callback function that receives the result indicating whether the user is subject to a shutdown. |
Returns
None
Callback
typedef void(__cdecl* OnShutdownFinished)(CallbackResult callbackResult, StovePCShutdown shutdown);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This is the callback result. |
shutdown | StovePCShutdown | This 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | callback is nullptr. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | There was a temporary issue. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary problem has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
Callback callbackResult | Callback Scope | This is a local object passed by value. You do not need to free it separately. |
Callback shutdown (StovePCShutdown) | Callback Scope | Since 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
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
Result Base_GetSignin(StovePCSignin* signin);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
signin | StovePCSignin* | Y | This variable is used to receive the logged-in user's registration and authentication information. |
Returns
| Type | Description |
|---|---|
Result | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | signin is nullptr. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
signin | Caller | Since the caller allocated the object on the stack, the caller manages it. The SDK only populates the internal fields. |
Example
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
Result Base_GetTraceHint(StovePCTraceHint* traceHint);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
traceHint | StovePCTraceHint* | Y | This is a variable that will receive information about the platform's route. |
Returns
| Type | Description |
|---|---|
Result | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | traceHint is nullptr. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
traceHint | Caller | Since the caller allocated the object on the stack, the caller manages it. The SDK only populates the internal fields. |
Example
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, andGetRefSessionId()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
Result Base_GetUser(StovePCUser* user);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
user | StovePCUser* | Y | This is the variable that will hold the logged-in user's information. |
Returns
| Type | Description |
|---|---|
Result | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | user is nullptr. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary problem has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For a complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
user | Caller | Since the caller allocated the object on the stack, the caller manages it. The SDK only populates the internal fields. |
Example
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 useGetGameUserId()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
Result Base_GetVersion(wchar_t* version, uint32_t length);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
version | wchar_t* | Y | This is the buffer that will receive the version information. |
length | uint32_t | Y | version is the length of the array. |
Returns
| Type | Description |
|---|---|
Result | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | version is nullptr, or length is 0, or the buffer is too small, so the resulting string was truncated. | x | |
| 251 | PCSDK_DLL_NOT_FOUND | The SDK DLL path could not be found. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary problem has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
version Buffer | Caller | Since the buffer was allocated by the caller, the caller manages it. |
Example
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
void Base_Initialize(const StovePCInitializeParam* initParam, OnInitializeFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
initParam | const StovePCInitializeParam* | Y | This is the information required for initialization (environment, game ID, app key). |
onFinished | OnInitializeFinished | Y | This is a callback function that receives the results of the initialization. |
Returns
None
Callback
typedef void(__cdecl* OnInitializeFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 1 | FAIL | An error occurred while parsing required information during the initialization of TokenActor. | x | |
| 5 | INVALID_PARAM | onFinished is nullptr, or at least one of environment, game_id, or app_key is empty. | x | |
| 18 | ALREADY_INITIALIZED | Initialization was attempted again while already initialized. | x | |
| 82 | NOT_FOUND_REQUIRED_INFORMATION | The information required for initialization could not be found. | x | |
| 84 | NEED_STOVE_LAUNCHER | The game was not launched via the Stove PC client. You must first call a function in the Base_RestartAppIfNecessary series. | O | The 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] |
| 251 | PCSDK_DLL_NOT_FOUND | The SDK version check failed, so the DLL path could not be found. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A 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.
84NEED_STOVE_LAUNCHER— You must relaunch the game via the Stove PC client
For a complete list, see SDKResultCode.
Example
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
- to initialize to the cached parameters, use Base_InitializeEx.
- To exit, call Base_UnInitialize.
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
void Base_InitializeEx(OnInitializeFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
onFinished | OnInitializeFinished | Y | This is a callback function that receives the results of the initialization. |
Returns
None
Callback
typedef void(__cdecl* OnInitializeFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This is the callback result. |
The callback runs in the thread that called Base_RunCallback().
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 1 | FAIL | An error occurred while parsing required information during the initialization of TokenActor. | x | |
| 5 | INVALID_PARAM | Either onFinished is nullptr, or at least one of the cached environment, game_id, or app_key is empty. | x | |
| 18 | ALREADY_INITIALIZED | Initialization was attempted again while already initialized. | x | |
| 82 | NOT_FOUND_REQUIRED_INFORMATION | The information required for initialization could not be found. | x | |
| 84 | NEED_STOVE_LAUNCHER | The game was not launched via the Stove PC client. You must first call a function from the Base_RestartAppIfNecessary series. | O | The 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] |
| 251 | PCSDK_DLL_NOT_FOUND | The SDK version check failed, and the DLL path could not be found. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
If you receive the code below, you must exit the game. The game cannot proceed normally.
84NEED_STOVE_LAUNCHER— You must restart the game via the Stove PC client
For the complete list, see SDKResultCode.
Example
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_RestartAppIfNecessaryseries 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
void Base_OpenExternalUrl(const wchar_t* url, OnOpenExternalUrlFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | const wchar_t* | Y | This is the URL you want to open. |
onFinished | OnOpenExternalUrlFinished | Y | Base_OpenExternalUrl This is a callback function that receives the results of the execution. |
Returns
None
Callback
typedef void(__cdecl* OnOpenExternalUrlFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success (URL opened successfully) | x | |
| 5 | INVALID_PARAM | onFinished is nullptr. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 253 | UNMANAGED_EXCEPTION | The browser failed to launch, or an exception occurred while it was running. | O | A temporary problem has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For a complete list, see SDKResultCode.
Example
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
void Base_OverImmersionNotification(OnOverImmersionFinished callback);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
callback | OnOverImmersionFinished | Y | This is a callback function that receives the results of the anti-excessive-engagement measures. |
Returns
None
Callback
typedef void(__cdecl* OnOverImmersionFinished)(CallbackResult callbackResult, StovePCOverImmersion overImmersion);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This is the callback result. |
overImmersion | StovePCOverImmersion | This 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | callback is nullptr. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 31 | NOT_SUPPORTED_COUNTRY | The logged-in user's GDS country is not South Korea (kr). | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary problem has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary problem has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
Callback callbackResult | Callback Scope | This is a local object passed by value. You do not need to release it separately. |
Callback overImmersion (StovePCOverImmersion) | Callback Scope | Since 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
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
bool Base_RestartAppIfNecessary(const StovePCInitializeParam* initParam);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
initParam | const StovePCInitializeParam* | Y | This is the information required for initialization (environment, game ID, app key). |
Returns
| Type | Description |
|---|---|
bool | Whether 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
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
- This function is synchronous and does not accept callbacks.
- The asynchronous versions are Base_RestartAppIfNecessaryAsync, Base_RestartAppIfNecessaryAsyncEx, and Base_RestartAppIfNecessaryAsyncEx2.
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
void Base_RestartAppIfNecessaryAsync(const StovePCInitializeParam* initParam, uint32_t waitTimeMillisec, OnRestartAppIfNecessaryAsyncFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
initParam | const StovePCInitializeParam* | Y | This is the information required for initialization (environment, game ID, app key). |
waitTimeMillisec | uint32_t | Y | This is the time to wait to verify whether the application was launched via the launcher. The recommended value is 60,000 (1 minute). |
onFinished | OnRestartAppIfNecessaryAsyncFinished | Y | This is a callback function that receives the result indicating whether the application was launched from the launcher. |
Returns
None
Callback
typedef void(__cdecl* OnRestartAppIfNecessaryAsyncFinished)(CallbackResult callbackResult, bool restartAppIfNecessary);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This is the callback result. |
restartAppIfNecessary | bool | Whether 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success (including cases where the previous call had already been completed) | x | |
| 29 | ASYNC_OPERATION_IN_PROGRESS | The asynchronous restart operation that was called just a moment ago is still in progress. | x | |
| 30 | BASE_UNINITIALIZED | The IPC connection status has reverted to its state prior to the initialization. | x | |
| 87 | IPC_CONNECT_FAILED | The IPC connection to the launcher failed. | O | The 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] |
| 88 | IPC_AES_KEY_NOT_RECEIVED | The encryption key was not received from the launcher. | O | The 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] |
| 89 | IPC_TIMEOUT | No response was received from the launcher within the specified timeout period (waitTimeMillisec). | O | The 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] |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A 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.
87IPC_CONNECT_FAILED— You must relaunch the game through the Stove PC client88IPC_AES_KEY_NOT_RECEIVED— You must restart the game via the Stove PC client89IPC_TIMEOUT— You must restart the game via the Stove PC client253UNMANAGED_EXCEPTION·254MANAGED_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
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
- To specify both the wait time and whether to run the launcher, use Base_RestartAppIfNecessaryAsyncEx.
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
void Base_RestartAppIfNecessaryAsyncEx(const StovePCInitializeParam* initParam, uint32_t waitTimeMillisec, bool launchLauncher, OnRestartAppIfNecessaryAsyncFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
initParam | const StovePCInitializeParam* | Y | This is the information needed for initialization (environment, game ID, app key). |
waitTimeMillisec | uint32_t | Y | This is the time to wait to confirm whether the application was launched via the launcher. The recommended value is 60,000 (1 minute). |
launchLauncher | bool | Y | This 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. |
onFinished | OnRestartAppIfNecessaryAsyncFinished | Y | This is a callback function that receives the result indicating whether the application was launched from the launcher. |
Returns
None
Callback
typedef void(__cdecl* OnRestartAppIfNecessaryAsyncFinished)(CallbackResult callbackResult, bool restartAppIfNecessary);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This is the callback result. |
restartAppIfNecessary | bool | Whether 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success (including cases where the previous call had already been completed) | x | |
| 29 | ASYNC_OPERATION_IN_PROGRESS | The asynchronous restart operation that was called just a moment ago is still in progress. | x | |
| 30 | BASE_UNINITIALIZED | The IPC connection state reverted to the state before initialization while waiting. | x | |
| 87 | IPC_CONNECT_FAILED | The IPC connection to the launcher failed. | O | The 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] |
| 88 | IPC_AES_KEY_NOT_RECEIVED | The encryption key was not received from the launcher. | O | The 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] |
| 89 | IPC_TIMEOUT | No response was received from the launcher within the specified timeout (waitTimeMillisec). | O | The 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] |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
If you receive the code below, you must exit the game. The game cannot proceed normally.
87IPC_CONNECT_FAILED— You must restart the game via the Stove PC client88IPC_AES_KEY_NOT_RECEIVED— You must restart the game via the Stove PC client89IPC_TIMEOUT— You must relaunch the game via the Stove PC client253UNMANAGED_EXCEPTION·254MANAGED_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
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 thelaunchLauncherargument to control whether the launcher runs automatically. - To pass
waitTimeMillisecandlaunchLauncheras 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.
platformNameis 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
void Base_RestartAppIfNecessaryAsyncEx2(const StovePCInitializeParamEx2* initParam, OnRestartAppIfNecessaryAsyncFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
initParam | const StovePCInitializeParamEx2* | Y | This information is required for initialization. It includes not only the environment, game ID, and app key, but also waitTimeMillisec, launchLauncher, and platformName. |
onFinished | OnRestartAppIfNecessaryAsyncFinished | Y | This is a callback function that receives the result indicating whether the application was launched from the launcher. |
Returns
None
Callback
typedef void(__cdecl* OnRestartAppIfNecessaryAsyncFinished)(CallbackResult callbackResult, bool restartAppIfNecessary);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This is the callback result. |
restartAppIfNecessary | bool | Whether 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success (including cases where the previous call had already been completed) | x | |
| 29 | ASYNC_OPERATION_IN_PROGRESS | The asynchronous restart operation that was called immediately prior is still in progress. | x | |
| 30 | BASE_UNINITIALIZED | The IPC connection status has reverted to its state prior to initialization. | x | |
| 87 | IPC_CONNECT_FAILED | The IPC connection to the launcher failed. | O | The 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] |
| 88 | IPC_AES_KEY_NOT_RECEIVED | The encryption key was not received from the launcher. | O | The 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] |
| 89 | IPC_TIMEOUT | No response was received from the launcher within the specified timeout (initParam.wait_time_millisec). | O | The 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] |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | There was a temporary issue. Please try again. [OK] |
If you receive the code below, you must exit the game. The game cannot proceed normally.
87IPC_CONNECT_FAILED— You must restart the game via the Stove PC client88IPC_AES_KEY_NOT_RECEIVED— You must relaunch the game via the Stove PC client89IPC_TIMEOUT— You must restart the game via the Stove PC client253UNMANAGED_EXCEPTION·254MANAGED_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
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, andplatformNameas a singleStovePCInitializeParamEx2structure. StovePCInitializeParamEx2is 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
void Base_RunCallback();
Parameters
None
Returns
None
Error Codes
None
Example
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
void Base_RunCallbackWithTimeout(uint32_t timeoutMillisec);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
timeoutMillisec | uint32_t | Y | This is the timeout duration (in milliseconds). |
Returns
None
Error Codes
None
Example
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
Result Base_SetGameProfile(const StovePCGameProfile* gameProfile);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
gameProfile | const StovePCGameProfile* | Y | This is the game profile information (World ID, Character ID). |
Returns
| Type | Description |
|---|---|
Result | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | gameProfile is nullptr. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary problem has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary problem has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Example
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
StovePCGameProfilecan be set directly toworldIdorcharacterNumberas its constructor, or it can be set toSetWorldId()orSetCharacterNumber().
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
Result Base_SetLanguage(StoveLanguage language);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
language | StoveLanguage | Y | Language information. |
Returns
| Type | Description |
|---|---|
Result | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | language is a language code that is not supported. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | There was a temporary issue. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | There was a temporary issue. Please try again. [OK] |
For the complete list, see SDKResultCode.
Example
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
Result Base_SetLanguageEx(const wchar_t* language);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
language | const wchar_t* | Y | This is a language information string. |
Returns
| Type | Description |
|---|---|
Result | Here are the results of the function call. If result.IsSuccessful() is equal to true, the call was successful. |
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | language is either nullptr or an unsupported language code. | x | |
| 16 | BASE_NOT_INITIALIZED | This method was called before the SDK was initialized. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | There was a temporary issue. Please try again. [OK] |
For the complete list, see SDKResultCode.
Example
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_SetLanguageis that you can specify a language code that is not included in the list of values inStoveLanguage.
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
void Base_ShutdownNotification(OnShutdownFinished callback);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
callback | OnShutdownFinished | Y | This is a callback function that receives the result indicating whether the user is subject to a shutdown. |
Returns
None
Callback
typedef void(__cdecl* OnShutdownFinished)(CallbackResult callbackResult, StovePCShutdown shutdown);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This is the callback result. |
shutdown | StovePCShutdown | This 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | callback is nullptr. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
Callback callbackResult | Callback Scope | This is a local object passed by value. You do not need to free it separately. |
Callback shutdown (StovePCShutdown) | Callback Scope | Since 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
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
Result Base_UnInitialize();
Parameters
None
Returns
| Type | Description |
|---|---|
Result | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Example
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
void Base_VietnamAgeRatingNotification(OnVietnamAgeRatingFinished callback);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
callback | OnVietnamAgeRatingFinished | Y | This is a callback function that receives the results of the Vietnam age rating check. |
Returns
None
Callback
typedef void(__cdecl* OnVietnamAgeRatingFinished)(CallbackResult callbackResult, StovePCVietnamAgeRatingInfo vietnamAgeRatingInfo);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This is the callback result. |
vietnamAgeRatingInfo | StovePCVietnamAgeRatingInfo | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | callback is nullptr. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 31 | NOT_SUPPORTED_COUNTRY | The logged-in user's GDS country is not Vietnam (vn). | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For a complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
Callback callbackResult | Callback Scope | This is a local object passed by value. You do not need to free it separately. |
Callback vietnamAgeRatingInfo (StovePCVietnamAgeRatingInfo) | Callback Scope | Since 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
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
void Base_VietnamOverimmersionNotification(OnVietnamOverimmersionFinished callback);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
callback | OnVietnamOverimmersionFinished | Y | This is a callback function that receives the results of Vietnam's efforts to prevent excessive engagement. |
Returns
None
Callback
typedef void(__cdecl* OnVietnamOverimmersionFinished)(CallbackResult callbackResult, StovePCVietnamOverimmersionInfo vietnamOverimmersionInfo);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This is the callback result. |
vietnamOverimmersionInfo | StovePCVietnamOverimmersionInfo | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 5 | INVALID_PARAM | callback is nullptr. | x | |
| 16 | BASE_NOT_INITIALIZED | This call was made before the SDK was initialized. | x | |
| 31 | NOT_SUPPORTED_COUNTRY | The logged-in user's GDS country is not Vietnam (vn). | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
Callback callbackResult | Callback Scope | This is a local object passed by value. It does not need to be released separately. |
Callback vietnamOverimmersionInfo (StovePCVietnamOverimmersionInfo) | Callback Scope | Since 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
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
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
| Name | Type | Access | Description |
|---|---|---|---|
result / GetResult() | Result | Read | This 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* | Read | This is a detailed message explaining the cause of the error. |
externalError / GetExternalError() | int32_t | Read | This is an error value generated externally (HTTP error or API result code). |
callerIdentifier | uint64_t | Read | This is the identifier for the caller. |
Example
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()andBase_RestartAppIfNecessaryAsync(). - The callback runs in the thread that called
Base_RunCallback(). callerIdentifieris 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
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
| Code | Name | Description |
|---|---|---|
| 0 | CUSTOM | Custom |
| 1 | PRESET_01 | Preset 1 |
| 2 | PRESET_02 | Preset 2 |
| 3 | PRESET_03 | Preset 3 |
| 4 | PRESET_04 | Preset 4 |
| 5 | PRESET_05 | Preset 5 |
| 6 | PRESET_06 | Preset 6 |
| 7 | DEFAULT | Default |
Example
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.handViewSDKStructures.hranges. - 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
enum class DiscountType : uint32_t
{
NONE = 0,
FIXED_RATE = 1,
FLAT_RATE = 2,
};
Enum Values
| Code | Name | Description |
|---|---|---|
| 0 | NONE | No discount |
| 1 | FIXED_RATE | Fixed-Rate Discount |
| 2 | FLAT_RATE | Flat-Rate Discount |
Example
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
Result IAP_CloseAllPopups();
Parameters
None
Returns
| Type | Description |
|---|---|
Result | Function call result. Success is determined by result.IsSuccessful(). |
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The payment function has not been initialized. You must first call IAP_Initialize(). | x | |
| 80 | VIEWUI_NOT_INITIALIZED | The internal UI module used to display pop-ups has not been initialized. | x | |
| 89 | WEBVIEW_CLOSE_ALL_FAIL | Failed to close all open pop-ups. | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | A temporary problem has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | A temporary problem has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Example
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_StartPurchase
- IAP_WithdrawGame
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
void IAP_ConfirmPurchase(int64_t transactionMasterNumber, OnConfirmPurchaseFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
transactionMasterNumber | int64_t | Y | Order Master Number |
onFinished | OnConfirmPurchaseFinished | Y | Callback function that registers information regarding the completion of a product purchase |
Returns
None
Callback
typedef void(__cdecl* OnConfirmPurchaseFinished)(CallbackResult callbackResult, bool status, StovePCPurchasedProduct* purchasedProducts, uint32_t purchasedProductSize, StovePCChargeInfo* chargeInfos, uint32_t chargeInfoSize);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Callback result value |
status | bool | Purchase Status |
purchasedProducts | StovePCPurchasedProduct* | Information on Purchased Items StovePCPurchasedProduct array |
purchasedProductSize | uint32_t | purchasedProducts Array size |
chargeInfos | StovePCChargeInfo* | Currency (charge) information used for payment StovePCChargeInfo array |
chargeInfoSize | uint32_t | chargeInfos Array size |
It runs in the thread that called Base_RunCallback(). It is passed only once per call.
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The payment feature has not been initialized. You must first call IAP_Initialize(). | x | |
| 21 | NULL_ENTITY | Unable to retrieve language settings. | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
Callback callbackResult | Callback Scope | This 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 elements | SDK | Do not unwrap. It will be invalidated once the callback completes, so you must copy any necessary values within the callback. |
Example
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
onFinishedcallback. - If
StovePCPurchaseOperationof IAP_StartPurchase isWITH_WEBVIEW_AND_CONFIRM_RESULT, the SDK automatically calls this function, so you do not need to call it separately. - Whether
statusandcallbackResultare successful is a separate matter. Even if the call itself was successful, ifstatusisfalse, 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
void IAP_FetchInventory(OnFetchInventoryFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
onFinished | OnFetchInventoryFinished | Y | A callback function that registers information about the entire list of purchased items |
Returns
None
Callback
typedef void(__cdecl* OnFetchInventoryFinished)(CallbackResult callbackResult, StovePCInventoryItem* inventoryItems, uint32_t inventoryItemSize);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Callback result value |
inventoryItems | StovePCInventoryItem* | Information on Purchased Items StovePCInventoryItem array |
inventoryItemSize | uint32_t | inventoryItems Array size |
It runs on the thread that called Base_RunCallback(). It is passed only once per call.
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The payment functionality has not been initialized. You must first call IAP_Initialize(). | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
Callback callbackResult | Callback Scope | This is a local object passed by value. You do not need to release it separately. |
The inventoryItems array of callbacks and each element | SDK | Do not unwrap. The object will be invalidated once the callback completes, so you must copy any necessary values within the callback. |
Example
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
onFinishedcallback.
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
void IAP_FetchProducts(const StovePCFetchProductParam* params, OnFetchProductsFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
params | const StovePCFetchProductParam* | Y | Product information to retrieve (category ID, page number, page size) |
onFinished | OnFetchProductsFinished | Y | Callback function that registers the retrieved product information |
Returns
None
Callback
typedef void(__cdecl* OnFetchProductsFinished)(CallbackResult callbackResult, StovePCProduct* products, uint32_t productSize);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Callback result value |
products | StovePCProduct* | StovePCProduct arrays retrieved |
productSize | uint32_t | products Array size |
It runs in the thread that called Base_RunCallback(). It is passed only once per call.
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The payment functionality has not been initialized. You must first call IAP_Initialize(). | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | There was a temporary issue. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
params | Caller | This 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 | Callback Scope | This is a local object passed by value. You do not need to free it separately. |
The products array of callbacks and each element | SDK | Do not unwrap. The callback will be invalidated once it completes, so you must copy any necessary values within the callback. |
Example
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(¶ms, OnFetchProductsFinished);
Notes
- This function is asynchronous, and the result is returned only via the
onFinishedcallback. - If you leave the category ID for
paramsblank, 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 theExvariant.
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
void IAP_FetchProductsEx(const StovePCFetchProductParam* params, OnFetchProductsExFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
params | const StovePCFetchProductParam* | Y | Product information to retrieve (category ID, page number, page size) |
onFinished | OnFetchProductsExFinished | Y | Callback function that registers the retrieved product information |
Returns
None
Callback
typedef void(__cdecl* OnFetchProductsExFinished)(CallbackResult callbackResult, StovePCProductEx* products, uint32_t productSize);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Callback result value |
products | StovePCProductEx* | StovePCProductEx arrays found |
productSize | uint32_t | products Array size |
It runs in the thread that called Base_RunCallback(). It is passed only once per call.
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The payment feature has not been initialized. You must first call IAP_Initialize(). | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
params | Caller | This 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 | Callback Scope | This is a local object passed by value. There is no need to free it separately. |
The products array of callbacks and each element | SDK | Do not unwrap. The callback will be invalidated once it completes, so you must copy any necessary values within the callback. |
Example
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(¶ms, OnFetchProductsExFinished);
Notes
- This function is asynchronous, and the result is returned only via the
onFinishedcallback. - If you leave the category ID for
paramsblank, 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
void IAP_FetchShopCategories(OnFetchShopCategoriesFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
onFinished | OnFetchShopCategoriesFinished | Y | Callback function that registers the results of a store category query |
Returns
None
Callback
typedef void(__cdecl* OnFetchShopCategoriesFinished)(CallbackResult callbackResult, StovePCShopCategory* shopCategorys, uint32_t shopCategorySize);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Callback result value |
shopCategorys | StovePCShopCategory* | StovePCShopCategory arrays retrieved |
shopCategorySize | uint32_t | shopCategorys Array size |
It runs on the thread that called Base_RunCallback(). It is passed only once per call.
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The payment functionality has not been initialized. You must first call IAP_Initialize(). | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
Callback callbackResult | Callback Scope | This is a local object passed by value. You do not need to free it separately. |
The shopCategorys array of callbacks and each element | SDK | Do not unwrap. This will be invalidated once the callback completes, so you must copy any necessary values within the callback. |
Example
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
onFinishedcallback. - The retrieved
CategoryIdcan 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
void IAP_FetchTermsAgreement(const StovePCTermsOption* options, OnFetchTermsAgreementFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
options | const StovePCTermsOption* | Y | A struct for passing options to the API |
onFinished | OnFetchTermsAgreementFinished | Y | Callback function that registers information regarding consent to mandatory terms and conditions |
Returns
None
Callback
typedef void(__cdecl* OnFetchTermsAgreementFinished)(CallbackResult callbackResult, bool agreed, const wchar_t* url);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Callback result value |
agreed | bool | Acceptance of the Terms of Service |
url | const 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The payment functionality has not been initialized. You must first call IAP_Initialize(). | x | |
| 80 | VIEWUI_NOT_INITIALIZED | The terms agreement screen must be opened, but the internal UI module is not initialized. | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to generate the terms and conditions agreement screen. | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | The URL for the Terms and Conditions agreement screen could not be loaded. | x | |
| 87 | WEBVIEW_CREATE_COOKIE_FAIL | The host address for the Terms and Conditions agreement screen could not be found. | O | You 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] |
| 89 | WEBVIEW_CLOSE_ALL_FAIL | The existing pop-up could not be closed before opening the terms agreement screen. | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | A temporary problem has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
options | Caller | This 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, url | SDK | Do not unwrap. It will be invalidated once the callback completes, so you must copy any necessary values within the callback. |
Example
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
onFinishedcallback. - 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
void IAP_FetchTermsAgreementEx(const StovePCTermsOption* options, OnFetchTermsAgreementFinished onFinished, OnIAPPopupDestroyFinished onDestroy);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
options | const StovePCTermsOption* | Y | A structure for passing options to the API |
onFinished | OnFetchTermsAgreementFinished | Y | Callback function that registers information regarding consent to mandatory terms and conditions |
onDestroy | OnIAPPopupDestroyFinished | Y | A callback function that receives the result when the popup closes |
Returns
None
Callback
typedef void(__cdecl* OnFetchTermsAgreementFinished)(CallbackResult callbackResult, bool agreed, const wchar_t* url);
typedef void(__cdecl* OnIAPPopupDestroyFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Call Results |
agreed | bool | Acceptance of the Terms of Service |
url | const wchar_t* | Terms of Service URL (leave blank if agreed == true) |
It runs in the thread that called Base_RunCallback().
onFinishedis passed only once per call.onDestroyis passed after all pop-ups created by this call have been closed.
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The payment feature has not been initialized. You must first call IAP_Initialize(). | x | |
| 80 | VIEWUI_NOT_INITIALIZED | The terms agreement screen must be opened, but the internal UI module is not initialized. | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to generate the Terms and Conditions consent screen. | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | The URL for the Terms and Conditions agreement screen could not be loaded. | x | |
| 87 | WEBVIEW_CREATE_COOKIE_FAIL | The host address for the Terms of Service agreement screen could not be found. | O | You 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] |
| 89 | WEBVIEW_CLOSE_ALL_FAIL | The existing pop-up could not be closed before opening the terms agreement screen. | x | |
| 90 | WEBVIEW_CLOSE_FAIL | An error occurred while closing the Terms of Service agreement screen. The error is being passed to the onDestroy callback. | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
options | Caller | This 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, url | SDK | Do not unwrap. It will be invalidated once the callback ends, so you must copy any necessary values within the callback. |
Example
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
onFinishedcallback. onDestroyIf 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
void IAP_FetchVoidedPurchases(OnFetchVoidedPurchasesFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
onFinished | OnFetchVoidedPurchasesFinished | Y | A callback function that registers information about the list of purchase records for which the current user has processed a refund |
Returns
None
Callback
typedef void(__cdecl* OnFetchVoidedPurchasesFinished)(CallbackResult callbackResult, StovePCVoidedPurchase* voidedPurchases, uint32_t voidedPurchaseSize);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Callback result value |
voidedPurchases | StovePCVoidedPurchase* | Refund Processing Information StovePCVoidedPurchase Array |
voidedPurchaseSize | uint32_t | voidedPurchases Array size |
It runs on the thread that called Base_RunCallback(). It is passed only once per call.
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The payment functionality has not been initialized. You must first call IAP_Initialize(). | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
Callback callbackResult | Callback Scope | This is a local object passed by value. You do not need to free it separately. |
The voidedPurchases array of callbacks and each element | SDK | Do not unwrap. It will be invalidated once the callback finishes, so you must copy any necessary values within the callback. |
Example
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
onFinishedcallback. - 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
void IAP_FetchVoidedPurchasesEx(StovePCVoidedPurchasesMarketType marketType, OnFetchVoidedPurchasesExFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
marketType | StovePCVoidedPurchasesMarketType | Y | Market Type to Query |
onFinished | OnFetchVoidedPurchasesExFinished | Y | A callback function that registers a list of purchase records for which the current user has processed a refund |
Returns
None
Callback
typedef void(__cdecl* OnFetchVoidedPurchasesExFinished)(CallbackResult callbackResult, StovePCVoidedPurchasesEx* voidedPurchasesEx, uint32_t voidedPurchaseSize);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Callback result value |
voidedPurchasesEx | StovePCVoidedPurchasesEx* | Refund Processing Information StovePCVoidedPurchasesEx Array |
voidedPurchaseSize | uint32_t | voidedPurchasesEx Array size |
It runs in the thread that called Base_RunCallback(). It is passed only once per call.
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| — | — | This function is not currently available in the SDK. | — | — |
For other possible error codes, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
Callback callbackResult | Callback Scope | This is a local object passed by value. It does not need to be released separately. |
The voidedPurchasesEx array of callbacks and each of its elements | SDK | Do not unwrap. This will be invalidated once the callback completes, so you must copy the necessary values within the callback. |
Example
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
onFinishedcallback. - 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
Result IAP_GetVersion(__out wchar_t* version, uint32_t length);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
version | wchar_t* (out) | Y | Buffer to receive version information |
length | uint32_t | Y | The length of the version array |
Returns
| Type | Description |
|---|---|
Result | Function call result. Success is determined by result.IsSuccessful(). |
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 251 | PCSDK_DLL_NOT_FOUND | The path to the SDK DLL file cannot be found. | x | |
| 253 | UNMANAGED_EXCEPTION | An unexpected exception occurred within the SDK. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An unexpected exception occurred within the SDK. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
version | Caller | This buffer was allocated by the caller. It does not need to be freed separately. |
Example
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
Result IAP_Initialize(const wchar_t* shopKey);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
shopKey | const wchar_t* | Y | shopKey issued by a partner |
Returns
| Type | Description |
|---|---|
Result | Function call result. Success is determined by result.IsSuccessful(). |
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 16 | BASE_NOT_INITIALIZED | The SDK has not been initialized. You must first call Base_Initialize(). | x | |
| 18 | ALREADY_INITIALIZED | It is already initialized. You must try again after calling IAP_UnInitialize(). | x | |
| 80 | VIEWUI_NOT_INITIALIZED | Failed to initialize the internal UI module used to display the payment screen. | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Example
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()andIAP_Initialize()separately. The new interface (Stove_Initialize) initializes the SDK, pop-up, and payment features all at once with a single call, depending on theinitParamsetting. - 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
Result IAP_InitializeWithWndInfo(const wchar_t* shopKey, const void* mainWndHandle);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
shopKey | const wchar_t* | Y | shopKey issued by a partner |
mainWndHandle | const void* | Y | The main window handle (HWND) that will serve as the parent window for the Internal Style pop-up |
Returns
| Type | Description |
|---|---|
Result | Function call result. Success is determined by result.IsSuccessful(). |
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 16 | BASE_NOT_INITIALIZED | The SDK has not been initialized. You must first call Base_Initialize(). | x | |
| 18 | ALREADY_INITIALIZED | It is already initialized. You must try again after calling IAP_UnInitialize(). | x | |
| 80 | VIEWUI_NOT_INITIALIZED | Failed to initialize the internal UI module used to display the payment screen. | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Example
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 ininitParaminitializes 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
void IAP_StartPayment(const StovePCPaymentOption* options, OnStartPaymentFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
options | const StovePCPaymentOption* | Y | A struct for passing options to the API |
onFinished | OnStartPaymentFinished | Y | Callback function that registers information about one-time payments |
Returns
None
Callback
typedef void(__cdecl* OnStartPaymentFinished)(CallbackResult callbackResult, const wchar_t* url);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Callback result value |
url | const wchar_t* | One-time payment URL |
It runs in the thread that called Base_RunCallback(). It is passed only once per call.
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The payment functionality has not been initialized. You must first call IAP_Initialize(). | x | |
| 80 | VIEWUI_NOT_INITIALIZED | The payment screen must be opened, but the internal UI module is not initialized. | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to generate the payment screen. | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | We were unable to load the URL for the payment screen. | x | |
| 89 | WEBVIEW_CLOSE_ALL_FAIL | The existing pop-up could not be closed before opening the new payment screen. | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
options | Caller | This 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, url | SDK | Do not unwrap. It will be invalidated once the callback completes, so you must copy any necessary values within the callback. |
Example
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
onFinishedcallback. - 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
void IAP_StartPaymentEx(const StovePCPaymentOption* options, OnStartPaymentFinished onFinished, OnIAPPopupDestroyFinished onDestroy);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
options | const StovePCPaymentOption* | Y | A struct for passing options to the API |
onFinished | OnStartPaymentFinished | Y | Callback function that registers information about one-time payments |
onDestroy | OnIAPPopupDestroyFinished | Y | A callback function that receives the result when the pop-up closes |
Returns
None
Callback
typedef void(__cdecl* OnStartPaymentFinished)(CallbackResult callbackResult, const wchar_t* url);
typedef void(__cdecl* OnIAPPopupDestroyFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Call Results |
url | const wchar_t* | One-time payment URL |
It runs in the thread that called Base_RunCallback().
onFinishedis passed only once per call.onDestroyis passed after all pop-ups created by this call have been closed.
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The payment feature has not been initialized. You must first call IAP_Initialize(). | x | |
| 80 | VIEWUI_NOT_INITIALIZED | The payment screen must be opened, but the internal UI module is not initialized. | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to generate the payment screen. | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | We were unable to load the URL for the payment screen. | x | |
| 89 | WEBVIEW_CLOSE_ALL_FAIL | The existing pop-up could not be closed before opening the new payment screen. | x | |
| 90 | WEBVIEW_CLOSE_FAIL | An error occurred while closing the payment screen. The error code onDestroy is being passed to the callback. | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | A temporary problem has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
options | Caller | This 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, url | SDK | Do not unwrap. It will be invalidated once the callback completes, so you must copy any necessary values within the callback. |
Example
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
onFinishedcallback. onDestroyIf 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 callIAP_ConfirmPurchase.WITH_WEBVIEW_AND_CONFIRM_RESULT(Recommended): Proceed with the payment through Stove Webview; upon successful payment, the SDK automatically callsIAP_ConfirmPurchaseand returns the confirmed purchase result toonFinished.
You must initialize it to IAP_Initialize() before calling it.
Declaration
void IAP_StartPurchase(const StovePCStartPurchaseParam* params, OnStartPurchaseFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
params | const StovePCStartPurchaseParam* | Y | List of Items to Purchase and Purchase Options |
onFinished | OnStartPurchaseFinished | Y | Callback function that registers the results of a product purchase |
Returns
None
Callback
typedef void(__cdecl* OnStartPurchaseFinished)(CallbackResult callbackResult, StovePCPurchaseResult purchaseResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Callback result |
purchaseResult | StovePCPurchaseResult | Purchase 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The payment feature has not been initialized. You must first call IAP_Initialize(). | x | |
| 80 | VIEWUI_NOT_INITIALIZED | The payment screen must be opened, but the internal UI module is not initialized. | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to generate the payment screen. | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | We were unable to load the URL for the payment page. | x | |
| 84 | WEBVIEW_CLOSED_BEFORE_PURCHASE | The user closed the payment screen before the payment was completed. | O | Your purchase was not completed successfully. Please try again. [OK] |
| 85 | PARAMETER_LENGTH_EXCEEDED | serviceTxnNo exceeds 50 characters, or extraData exceeds 500 characters. | O | The payment information is invalid, so we cannot process the payment. Please try again. [OK] |
| 86 | INVALID_JSON_STRING | extraData is not a valid JSON format. | O | The payment information is invalid, so we cannot process the payment. Please try again. [OK] |
| 88 | INVALID_ORDER_PRODUCT_INFORMATION | There are items in your order with a quantity of 0 or less, or with a negative sales price. | O | The payment information is invalid, so we cannot process the payment. Please try again. [OK] |
| 89 | WEBVIEW_CLOSE_ALL_FAIL | The existing pop-up could not be closed before opening the new payment screen. | x | |
| 252 | NOT_IMPLEMENTED | An unsupported operation value has been specified. | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | A 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
| Object | Owner | Release |
|---|---|---|
params | Caller | This 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, purchaseResult | Callback Scope | This 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
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(¶ms, OnStartPurchaseFinished);
Notes
- This function is asynchronous, and the result is passed only via the
onFinishedcallback. - Purchases that begin with
DEFAULTorWITH_WEBVIEWmust be finalized by calling IAP_ConfirmPurchase. The SDK automatically handles the finalization forWITH_WEBVIEW_AND_CONFIRM_RESULT. - You can use the
GetPurchaseProgress()value (PurchaseProgress) ofpurchaseResultto 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
void IAP_StartPurchaseEx(const StovePCStartPurchaseParam* params,
OnStartPurchaseFinished onFinished, OnIAPPopupDestroyFinished onDestroy);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
params | const StovePCStartPurchaseParam* | Y | List of Items to Purchase and Purchase Options |
onFinished | OnStartPurchaseFinished | Y | Callback function that registers the results of a product purchase |
onDestroy | OnIAPPopupDestroyFinished | Y | A callback function that receives the result when the popup closes |
Returns
None
Callback
typedef void(__cdecl* OnStartPurchaseFinished)(CallbackResult callbackResult, StovePCPurchaseResult purchaseResult);
typedef void(__cdecl* OnIAPPopupDestroyFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Call Results |
purchaseResult | StovePCPurchaseResult | Purchase Results. The fields that are populated vary depending on the value of StovePCPurchaseOperation. |
It runs in the thread that called Base_RunCallback().
onFinishedis passed only once per call.onDestroyis passed after all pop-ups created by this call have been closed.
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The payment feature has not been initialized. You must first call IAP_Initialize(). | x | |
| 80 | VIEWUI_NOT_INITIALIZED | The payment screen must be opened, but the internal UI module is not initialized. | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to generate the payment screen. | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | We were unable to load the URL for the payment screen. | x | |
| 84 | WEBVIEW_CLOSED_BEFORE_PURCHASE | The user closed the payment screen before the payment was completed. | O | Your purchase was not completed successfully. Please try again. [OK] |
| 85 | PARAMETER_LENGTH_EXCEEDED | serviceTxnNo exceeds 50 characters, or extraData exceeds 500 characters. | O | The payment information is invalid, so we cannot process the payment. Please try again. [OK] |
| 86 | INVALID_JSON_STRING | extraData is not in valid JSON format. | O | The payment information is invalid, so we cannot process the payment. Please try again. [OK] |
| 88 | INVALID_ORDER_PRODUCT_INFORMATION | There are items in your order with a quantity of 0 or less, or with a negative price. | O | The payment information is invalid, so we cannot process the payment. Please try again. [OK] |
| 89 | WEBVIEW_CLOSE_ALL_FAIL | The existing pop-up could not be closed before opening the new payment screen. | x | |
| 90 | WEBVIEW_CLOSE_FAIL | An error occurred while closing the payment screen. The error is being passed to the onDestroy callback. | x | |
| 252 | NOT_IMPLEMENTED | An unsupported operation value has been specified. | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | There was a temporary issue. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | There 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
| Object | Owner | Release |
|---|---|---|
params | Caller | This 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, purchaseResult | Callback Scope | This 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
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(¶ms, OnStartPurchaseFinished, OnStartPurchasePopupDestroyed);
Notes
- This function is asynchronous, and the result is passed to the
onFinishedcallback. - Purchases that begin with
DEFAULTorWITH_WEBVIEWmust be confirmed by calling IAP_ConfirmPurchase. The SDK automatically handles the confirmation forWITH_WEBVIEW_AND_CONFIRM_RESULT. onDestroyIf 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
Result IAP_UnInitialize();
Parameters
None
Returns
| Type | Description |
|---|---|
Result | Function call result. Success is determined by result.IsSuccessful(). |
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The payment functionality has not been initialized. You must first call IAP_Initialize(). | x | |
| 81 | VIEWUI_UNINIT_FAILED | Failed to clean up the internal UI module. | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred during processing. | O | A temporary problem has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during processing. | O | A temporary problem has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Example
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
Result Log_GetVersion(__out wchar_t* version, uint32_t length);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
version | wchar_t* | Y | This is the buffer that will receive the version information. It is allocated by the caller. |
length | uint32_t | Y | version is the length of the buffer. |
Returns
| Type | Description |
|---|---|
Result | Here 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
| Object | Owner | Release |
|---|---|---|
version Buffer | Caller | Since the buffer was allocated by the caller, the caller manages it. |
Example
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
versionThe buffer must be greater than or equal tolength; 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
Result Log_Initialize();
Parameters
None
Returns
| Type | Description |
|---|---|
Result | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | It worked. | x | |
| 16 | BASE_NOT_INITIALIZED | The SDK has not been initialized. You must first call Base_Initialize(). | x | |
| 18 | ALREADY_INITIALIZED | It is already initialized. | x | |
| 80 | LOCAL_DB_CREATE_WORKING_DIRECTORY_FAILED | Unable to create the local working directory to store the logs. | x | |
| 81 | LOCAL_DB_CONNECT_FAILED | Unable to connect to the local database where logs are stored. | x | |
| 82 | LOCAL_DB_CREATE_TABLE_FAILED | Unable to create the local database table to store the logs. | x | |
| 251 | PCSDK_DLL_NOT_FOUND | This is returned if the internal version check performed during the initialization process fails. | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred within the SDK. | O | There was a temporary issue. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred within the SDK. | O | There was a temporary issue. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Example
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_INITIALIZEDmay 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
void Log_Send(const StovePCLogSendParam* logSendParam, OnLogSendFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
logSendParam | const StovePCLogSendParam* | Y | This information is for sending logs. |
onFinished | OnLogSendFinished | Y | This is a callback function that receives the log transmission results. |
Returns
None
Callback
typedef void(__cdecl* OnLogSendFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | The log has been successfully recorded in the local database. | x | |
| 17 | NOT_INITIALIZED | This function was called before the log was initialized. | x | |
| 84 | LOCAL_DB_BACKUP_LOG_FAILED | Failed to write the log to the local database. | x | |
| 85 | INVALID_LOG_PARAMETER | logSendParam.contents is not in the correct JSON format. | x | |
| 86 | LOG_SIZE_EXCEEDED | The log entry exceeds the maximum allowed size (50 KB). | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred within the SDK. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred within the SDK. | O | There was a temporary issue. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
logSendParam | Caller | This 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 | SDK | Do not unwrap. The callback will be invalidated once it completes, so you must copy any necessary values within the callback. |
Example
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 bySUCCESSas 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
Result Log_UnInitialize();
Parameters
None
Returns
| Type | Description |
|---|---|
Result | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | It worked. | x | |
| 17 | NOT_INITIALIZED | This function was called before the log function was initialized. | x | |
| 83 | LOCAL_DB_DISCONNECT_FAILED | Failed to disconnect from the local database. | x | |
| 253 | UNMANAGED_EXCEPTION | An unknown exception occurred within the SDK. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred within the SDK. | O | There was a temporary issue. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Example
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
- This is the exit function that pairs with Log_Initialize().
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
void PCBang_CheckPCBangStatus(OnPCBangCheckPCBangStatusOnFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
onFinished | OnPCBangCheckPCBangStatusOnFinished | Y | This is the callback function that receives the query results. |
Returns
None
Callback
typedef void(__cdecl* OnPCBangCheckPCBangStatusOnFinished)(CallbackResult callbackResult, StovePCBangStatus pcBangStatus);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This is the callback result. |
pcBangStatus | StovePCBangStatus | This 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The SDK or the PC Bang function has not been initialized. You must call PCBang_Initialize() first. | x | |
| 22 | HTTP_ERROR | The network communication for the status query request failed. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 23 | RESPONSE_ERROR | The server response is incorrect. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 25 | RESPONSE_VALUE_IS_NULL | The server response is empty. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 249 | NETWORK_TRANSPORT_ERROR | An error occurred during network transmission. | x | |
| 253 | UNMANAGED_EXCEPTION | An unexpected exception occurred within the SDK. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An unexpected exception occurred within the SDK. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
Callback callbackResult | Callback Scope | This is a local object passed by value. You do not need to free it separately. |
Callback pcBangStatus (StovePCBangStatus) | Callback Scope | Since 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
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
- The query results will be returned as StovePCBangStatus.
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
Result PCBang_GetVersion(__out wchar_t* version, uint32_t length);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
version | wchar_t* | Y | This is the buffer that will receive the version information. It is allocated by the caller. |
length | uint32_t | Y | version is the length of the buffer. |
Returns
| Type | Description |
|---|---|
Result | Here 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
| Object | Owner | Release |
|---|---|---|
version Buffer | Caller | Since the caller allocated the buffer, the caller manages it. |
Example
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
versionThe buffer must be greater than or equal tolength; 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
Result PCBang_Initialize();
Parameters
None
Returns
| Type | Description |
|---|---|
Result | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 16 | BASE_NOT_INITIALIZED | The SDK has not been initialized. You must first call Base_Initialize(). | x | |
| 18 | ALREADY_INITIALIZED | It is already initialized. You must try again after calling PCBang_UnInitialize(). | x | |
| 251 | PCSDK_DLL_NOT_FOUND | The initialization process did not complete because the internal version check failed. | x | |
| 253 | UNMANAGED_EXCEPTION | An unexpected exception occurred within the SDK. | O | There was a temporary issue. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An unexpected exception occurred within the SDK. | O | A temporary problem has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Example
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_INITIALIZEDmay 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
Result PCBang_UnInitialize();
Parameters
None
Returns
| Type | Description |
|---|---|
Result | Here 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | It is not yet initialized or has already been shut down. | x | |
| 253 | UNMANAGED_EXCEPTION | An unexpected exception occurred within the SDK. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An unexpected exception occurred within the SDK. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Example
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
- This is the termination function that pairs with PCBang_Initialize().
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
void PCBang_UserLogin(OnPCBangUserLoginOnFinished onUserLoginFinished, OnPCBangRefreshUserBenefitsOnFinished onRefreshBenefitsFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
onUserLoginFinished | OnPCBangUserLoginOnFinished | Y | This is the callback function that receives the login result. |
onRefreshBenefitsFinished | OnPCBangRefreshUserBenefitsOnFinished | Y | This is a callback function that receives user benefit information updated every 4 minutes. |
Returns
None
Callback
Login Result Callback — onUserLoginFinished
typedef void(__cdecl* OnPCBangUserLoginOnFinished)(CallbackResult callbackResult, StovePCBangUserLogin userLogin);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This is the callback result. |
userLogin | StovePCBangUserLogin | Here 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
typedef void(__cdecl* OnPCBangRefreshUserBenefitsOnFinished)(CallbackResult callbackResult, StovePCRefreshUserBenefits refreshUserBenefits);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This is the callback result. |
refreshUserBenefits | StovePCRefreshUserBenefits | Here 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)
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The SDK or the PC Bang feature has not been initialized. You must call PCBang_Initialize() first. | x | |
| 22 | HTTP_ERROR | The network communication for the login request failed. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 23 | RESPONSE_ERROR | The server response is invalid. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 25 | RESPONSE_VALUE_IS_NULL | The server response is empty. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 26 | RESPONSE_INVALID_VALUE_FORMAT | The format of the server response value is incorrect. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 249 | NETWORK_TRANSPORT_ERROR | An error occurred during network transmission. | x | |
| 253 | UNMANAGED_EXCEPTION | An unexpected exception occurred within the SDK. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An unexpected exception occurred within the SDK. | O | A temporary issue has occurred. Please try again. [OK] |
Benefits Refresh Callback (onRefreshBenefitsFinished)
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The SDK or PC Bang feature has not been initialized. | x | |
| 22 | HTTP_ERROR | The network communication for the benefit renewal request failed. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 23 | RESPONSE_ERROR | The server response is invalid. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 25 | RESPONSE_VALUE_IS_NULL | The server response is empty. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 26 | RESPONSE_INVALID_VALUE_FORMAT | The format of the server response value is incorrect. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 249 | NETWORK_TRANSPORT_ERROR | An error occurred during network transmission. | x | |
| 253 | UNMANAGED_EXCEPTION | An unexpected exception occurred within the SDK. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An unexpected exception occurred within the SDK. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
Callback callbackResult | Callback Scope | This is a local object passed by value. You do not need to free it separately. |
Callback userLogin (StovePCBangUserLogin) | Callback Scope | Since 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 Scope | Since 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
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
- Even when the status is
PCBANG_FREE(Free Membership), the benefit renewal callback continues to be triggered. - To log out, call PCBang_UserLogout.
- For login results, see StovePCBangUserLogin; for benefit renewal results, see StovePCRefreshUserBenefits.
See Also
PCBang_UserLogout
Kind Function · Module PCBang · Version 3.0.2
Description
Log out the game user from the PC Bang service.
Declaration
void PCBang_UserLogout(OnPCBangUserLogoutOnFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
onFinished | OnPCBangUserLogoutOnFinished | Y | This is the callback function that receives the logout result. |
Returns
None
Callback
typedef void(__cdecl* OnPCBangUserLogoutOnFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | This 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.
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The SDK or the PC Bang feature has not been initialized. You must call PCBang_Initialize() first. | x | |
| 22 | HTTP_ERROR | The network communication for the logout request failed. | O | The network connection is not working properly. Please check your network status and try again. [OK] |
| 23 | RESPONSE_ERROR | The server response is invalid. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 25 | RESPONSE_VALUE_IS_NULL | The server response is empty. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 249 | NETWORK_TRANSPORT_ERROR | An error occurred during network transmission. | x | |
| 253 | UNMANAGED_EXCEPTION | An unexpected exception occurred within the SDK. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An unexpected exception occurred within the SDK. | O | A temporary issue has occurred. Please try again. [OK] |
For other possible error codes, see SDKResultCode.
Example
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
- This is a function that terminates a session that began with PCBang_UserLogin().
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
enum class PCBangPremium : int32_t
{
PCBANG_ERROR = -1,
PCBANG_PREMIUM = 1,
PCBANG_FREE = 2,
PCBANG_FREE_OTHER = 3,
};
Enum Values
| Code | Name | Description |
|---|---|---|
| -1 | PCBANG_ERROR | Error |
| — | (0) | Not used (Skip) |
| 1 | PCBANG_PREMIUM | Premium |
| 2 | PCBANG_FREE | Free Franchise |
| 3 | PCBANG_FREE_OTHER | Free Franchise for Homes (excluding internet cafes) |
Example
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_ERRORis 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
enum class ProductTypeCode : uint32_t
{
NONE = 0,
INDIE_PACKAGE_GAME_ITEM = 1,
IN_GAME_ITEM = 2,
PACKAGE_ITEM = 3,
};
Enum Values
| Code | Name | Description |
|---|---|---|
| 0 | NONE | None |
| 1 | INDIE_PACKAGE_GAME_ITEM | Indie Game Package Items |
| 2 | IN_GAME_ITEM | In-game items |
| 3 | PACKAGE_ITEM | Package Items |
Example
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
enum class PurchaseLimitTypeCode : uint32_t
{
NONE = 0,
UNLIMITED = 1,
MEMBER = 2,
CHARACTER = 3
};
Enum Values
| Code | Name | Description |
|---|---|---|
| 0 | NONE | No restrictions |
| 1 | UNLIMITED | Unlimited |
| 2 | MEMBER | Member-Specific Limits |
| 3 | CHARACTER | Character-Specific Restrictions |
Example
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
enum class PurchaseProgress : uint32_t
{
NONE = 0,
NEED_PAYMENT_WINDOW = 1,
NOT_NEED_PAYMENT_WINDOW = 2
};
Enum Values
| Code | Name | Description |
|---|---|---|
| 0 | NONE | None |
| 1 | NEED_PAYMENT_WINDOW | Need to open the payment window using a one-time payment URL |
| 2 | NOT_NEED_PAYMENT_WINDOW | Payment has been completed with a 0 won purchase, or manual URL calls are not required due to the use of WebView |
Example
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
namespace Stove
{
namespace PCSDK
{
struct Result
{
public:
bool IsSuccessful() const;
const wchar_t* GetSDKName() const;
uint32_t GetMethodCode() const;
uint32_t GetResultCode() const;
};
}
}
Members
| Name | Type | Access | Description |
|---|---|---|---|
IsSuccessful() | bool | Read | Whether the API was successful. |
GetSDKName() | const wchar_t* | Read | This is the name of the SDK that produced these results. |
GetMethodCode() | uint32_t | Read | This is the Method Code value of the function that produced this result. |
GetResultCode() | uint32_t | Read | This is the Result Code value of the function that produced this result. |
Example
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, andGetResultCode()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 byGetSDKName().
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 methodin the source is used for internal SDK communication and has been excluded from the table below.
Declaration
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
| Code | Name | Description |
|---|---|---|
| 1 | INITIALIZE | Base_Initialize |
| 2 | UNINITIALIZE | Base_UnInitialize |
| 5 | GET_VERSION | Base_GetVersion |
| — | 6 ~ 63 | Not used (internal values and reserved ranges) |
| 64 | GET_ACCESS_TOKEN | Base_GetAccessToken |
| 65 | ACCESS_TOKEN_RENEWED | Base_AccessTokenRenewed |
| 66 | GET_USER | Base_GetUser |
| 67 | SET_LANGUAGE | Base_SetLanguage |
| 68 | OVER_IMMERSION_NOTIFICATION | Base_OverImmersionNotification |
| 69 | SHUTDOWN_NOTIFICATION | Base_ShutdownNotification |
| 70 | LOG_ADD | Base_LogAdd (Deprecated) — There is no corresponding function in the currently released BaseSDK.h. |
| 71 | GET_TRACE_HINT | Base_GetTraceHint |
| 72 | SET_GAME_PROFILE | Base_SetGameProfile |
| 73 | GET_GDS | Base_GetGds |
| 74 | GET_SIGNIN | Base_GetSignin |
| 75 | RESTART_APP_IF_NECESSARY | Base_RestartAppIfNecessary |
| 76 | RESTART_APP_IF_NECESSARY_ASYNC | Base_RestartAppIfNecessaryAsync |
| 77 | OPEN_EXTERNAL_URL | Base_OpenExternalUrl |
| 78 | GET_CLOUD_SAVING_PATH | Base_GetCloudSavingPath — For StoreIndi only |
| 79 | VIETNAM_AGE_RATING_NOTIFICATION | Base_VietnamAgeRatingNotification |
| 80 | VIETNAM_OVER_IMMERSION_NOTIFICATION | Base_VietnamOverimmersionNotification |
| 81 | CLOSE_ALL_POPUPS | Closes 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 ~ 95 | Not 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
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 distinctSDKMethodenumerations. 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
enum class SDKMethod : uint32_t
{
INITIALIZE = 1U,
// ... See the "Values" table below
WITHDRAW_GAME = 89U,
};
Enum Values
| Code | Name | Description |
|---|---|---|
| 1 | INITIALIZE | IAP_Initialize |
| 2 | UNINITIALIZE | IAP_UnInitialize |
| 5 | GET_VERSION | IAP_GetVersion |
| 80 | FETCH_SHOP_CATEGORIES | IAP_FetchShopCategories |
| 81 | FETCH_PRODUCTS | IAP_FetchProducts |
| 82 | START_PURCHASE | IAP_StartPurchase |
| 83 | CONFIRM_PURCHASE | IAP_ConfirmPurchase |
| 84 | FETCH_INVENTORY | IAP_FetchInventory |
| 85 | FETCH_TERMS_AGREEMENT | IAP_FetchTermsAgreement |
| 86 | START_PAYMENT | IAP_StartPayment |
| 87 | FETCH_VOIDED_PURCHASES | IAP_FetchVoidedPurchases |
| 88 | CLOSE_ALL_POPUPS | IAP_CloseAllPopups |
| 89 | WITHDRAW_GAME | IAP_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
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 theSDKMethodfor 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::Login theSDKMethodnamespace. There is a separate enumeration with the same name in theStove::PCSDK::PCBangnamespace, but its values are different. You can checkResult::GetSDKName()to determine which module the values actually belong to.
Declaration
enum class SDKMethod : uint32_t
{
INITIALIZE = 1U,
UNINITIALIZE = 2U,
// ... See the "Values" table below
LOG_SEND = 80U
};
Enum Values
| Code | Name | Description |
|---|---|---|
| 1 | INITIALIZE | Log_Initialize |
| 2 | UNINITIALIZE | Log_UnInitialize |
| 5 | GET_VERSION | Log_GetVersion |
| — | (6–79) | Not used (Skip) |
| 80 | LOG_SEND | Log_Send |
Internal-use-only values (INTERNAL_SEND_81PLUG=3, INTERNAL_UPDATE_81PLUG=4) are not included in the document.
Example
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::PCBangin theSDKMethodnamespace. There is a separate enumeration with the same name in theStove::PCSDK::Lognamespace, but its values are different. You can useResult::GetSDKName()to verify which module the value actually belongs to.
Declaration
enum class SDKMethod : uint32_t
{
INITIALIZE = 1U,
UNINITIALIZE = 2U,
// ... See the "Values" table below
REFRESH_USER_BENEFITS = 83U,
};
Enum Values
| Code | Name | Description |
|---|---|---|
| 1 | INITIALIZE | PCBang_Initialize |
| 2 | UNINITIALIZE | PCBang_UnInitialize |
| 5 | GET_VERSION | PCBang_GetVersion |
| — | (6–79) | Not used (Skip) |
| 80 | USER_LOGIN | Callback for the login result of PCBang_UserLogin |
| 81 | USER_LOGOUT | PCBang_UserLogout |
| 82 | CHECK_PCBANG_STATUS | PCBang_CheckPCBangStatus |
| 83 | REFRESH_USER_BENEFITS | Benefit 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
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 separatePCBang_RefreshUserBenefitsfunction 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 namedSDKMethodalso exist in other modules, such as BaseSDK and IAPSDK, and the meaning of their values varies by namespace (module).
Declaration
enum class SDKMethod : uint32_t
{
INITIALIZE = 1U,
UNINITIALIZE = 2U,
// ... See the "Values" table below
FETCH_WEB_OPEN_KEY = 162U,
};
Enum Values
| Code | Name | Description |
|---|---|---|
| 1 | INITIALIZE | View_Initialize / View_InitializeWithWndInfo |
| 2 | UNINITIALIZE | View_UnInitialize |
| 5 | GET_VERSION | This 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. |
| 81 | AUTO_POPUP | View_AutoPopup / View_AutoPopupEx |
| 83 | MANUAL_POPUP | View_ManualPopup / View_ManualPopupEx |
| 85 | NEWS_POPUP | View_NewsPopup / View_NewsPopupEx |
| 87 | COUPON_POPUP | View_CouponPopup / View_CouponPopupEx |
| — | 89 | Not used (COMMUNITY_POPUP, a deprecated number with no corresponding public function) |
| 91 | VERIFY_IDENTIFICATION_POPUP | View_VerifyIdentificationPopup |
| 160 | SET_POPUP_DISALLOWED | View_SetPopupDisallowed |
| 161 | CLOSE_ALL_POPUPS | View_CloseAllPopups |
| 162 | FETCH_WEB_OPEN_KEY | View_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
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_AutoPopupandView_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 the1000range ofEStoveViewMethodCode. 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
- View_AutoPopup
- View_ManualPopup
- View_NewsPopup
- View_CouponPopup
- View_VerifyIdentificationPopup
- View_SetPopupDisallowed
- View_CloseAllPopups
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
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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 1 | FAIL | An error has occurred. Please identify the cause of the error and try again. | x | |
| 2 | INVALID_CONFIG | The config file cannot be found. You need to check the path to the configuration file. | x | |
| 3 | INVALID_LOG_LEVEL | The log level value is invalid. Please check the value in the calling code. | x | |
| 4 | INVALID_LOG_PATH | The log path is invalid. Please check the value in the caller. | x | |
| 5 | INVALID_PARAM | An incorrect parameter was entered. You must correct the call. | x | |
| — | 6 ~ 15 | Not in use (reserved section) | x | |
| 16 | BASE_NOT_INITIALIZED | The SDK has not been initialized. You must first call Base_Initialize(). | x | |
| 17 | NOT_INITIALIZED | Initialization has not been performed. You must call the initialization method first. | x | |
| 18 | ALREADY_INITIALIZED | It has already been initialized. You must remove the duplicate initialization call. | x | |
| 19 | INVALID_ACCESS_TOKEN | The AccessToken cannot be found. You need to log in again or renew your token. | O | Your login session has expired. Please close the game and restart it. [OK] |
| 20 | NULL_TOKEN_ENTITY | The token object cannot be found. Please try again; if the problem persists, please contact us. | x | |
| 21 | NULL_ENTITY | The object cannot be found at this time. Please try again; if the problem persists, please contact us. | x | |
| 22 | HTTP_ERROR | An HTTP communication error has occurred. Please check your network connection and try again. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 23 | RESPONSE_ERROR | An HTTP API response error has occurred. Please try again; if the error persists, please contact us. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 24 | RESPONSE_INVALID_CODE | The HTTP API response code cannot be found. Please try again; if the issue persists, contact us. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 25 | RESPONSE_VALUE_IS_NULL | The HTTP API response is empty. Please try again; if the issue persists, please contact us. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 26 | RESPONSE_INVALID_VALUE_FORMAT | The HTTP API response format is incorrect. Please try again; if the issue persists, please contact us. | O | The network connection is unstable. Please check your network connection and try again. [OK] |
| 27 | LOG_81PLUG_ERROR | This code is not in use. | x | |
| 28 | UPDATE_81PLUG_FEED_ERROR | This code is not in use. | x | |
| 29 | ASYNC_OPERATION_IN_PROGRESS | An asynchronous operation is currently in progress. Please try again after the operation is complete. | x | |
| 30 | BASE_UNINITIALIZED | The SDK has been uninitialized. It must be initialized again. | x | |
| 31 | NOT_SUPPORTED_COUNTRY | This feature is not currently supported in your country. | x | |
| 32 | AMPLITUDE_ERROR | The Amplitude transmission failed. Please try again. If the problem persists, please contact us. | x | |
| — | 33 ~ 79 | Not in use (reserved section) | x | |
| 80 | LANGUAGE_NOT_SET | No language has been set. | x | |
| 81 | EMPTY_TRANSLATED_STRING | There are no strings to translate. | x | |
| 82 | NOT_FOUND_REQUIRED_INFORMATION | Required information is missing. Please check the value in the caller section. | x | |
| 83 | INVALID_GDS_INFO | There is no GDS information. | x | |
| 84 | NEED_STOVE_LAUNCHER | The launcher must be running. | O | The 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] |
| 85 | LAUNCHER_FAILED_CREATE_REQUIRED | The launcher failed to generate the required values. | x | |
| 86 | RENEW_TOKEN_MAX_RETRY_COUNT_EXCEEDED | The number of token renewal attempts has been exceeded. You must log in again. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 87 | IPC_CONNECT_FAILED | The IPC communication connection failed. | O | The 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] |
| 88 | IPC_AES_KEY_NOT_RECEIVED | The AES encryption key was not received via IPC communication. | O | The 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] |
| 89 | IPC_TIMEOUT | A timeout occurred in the IPC communication. | O | The 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] |
| 90 | CLOSE_ALL_POPUPS_FAILED | We were unable to close all pop-ups. Please try again or check the status of the pop-ups. | x | |
| 91 | LOCAL_DB_CREATE_WORKING_DIRECTORY_FAILED | The local DB working folder could not be created. Please check the write permissions for the folder associated with the account running the program. | x | |
| 92 | LOCAL_DB_CONNECT_FAILED | The connection to the local database failed. | x | |
| 93 | LOCAL_DB_CREATE_TABLE_FAILED | Unable to create the local database table. | x | |
| — | 94 ~ 248 | Not in use (reserved section) | x | |
| 249 | NETWORK_TRANSPORT_ERROR | A 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 | |
| 250 | JSON_EXCEPTION | An HTTP API JSON response exception has occurred. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 251 | PCSDK_DLL_NOT_FOUND | The PC SDK DLL could not be found. Please check the installation path and the distribution files. | x | |
| 252 | NOT_IMPLEMENTED | This feature has not been implemented. | x | |
| 253 | UNMANAGED_EXCEPTION | An unhandled exception has occurred. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | A managed exception has occurred. | O | A temporary issue has occurred. Please try again. [OK] |
| 255 | UNKNOWN_ERROR | An unknown error has occurred. | x |
If you receive the code below, you must exit the game. The game cannot proceed normally.
19INVALID_ACCESS_TOKEN— Your login session has expired; you'll need to restart the game after exiting.84NEED_STOVE_LAUNCHER— You'll need to restart the game after it ends87IPC_CONNECT_FAILED— You will need to restart the game after it ends88IPC_AES_KEY_NOT_RECEIVED— You'll need to restart the game after it ends89IPC_TIMEOUT— You'll need to restart the game after it endsIf 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
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 separateSDKResultCodeenumerations. 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 theGetResultCode()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
enum class SDKResultCode : uint32_t
{
SUCCESS = 0U,
// ... See the "Values" table below
UNKNOWN_ERROR = 255U,
};
Enum Values
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 1 | FAIL | Failure | x | |
| 2 | INVALID_CONFIG | The config file cannot be found | x | |
| 3 | INVALID_LOG_LEVEL | The log level value is invalid. | x | |
| 4 | INVALID_LOG_PATH | The log path is invalid. | x | |
| 5 | INVALID_PARAM | An invalid parameter was entered. | x | |
| — | 6~15 | Not in use (reserved section) | x | |
| 16 | BASE_NOT_INITIALIZED | The SDK has not been initialized. | x | |
| 17 | NOT_INITIALIZED | Initialization failed. | x | |
| 18 | ALREADY_INITIALIZED | It is already initialized. | x | |
| 19 | INVALID_ACCESS_TOKEN | The AccessToken cannot be found | O | Your login session has expired. Please close the game and restart it. [OK] |
| 20 | NULL_TOKEN_ENTITY | The Token object cannot be found. | x | |
| 21 | NULL_ENTITY | The object cannot be found at this time. | x | |
| 22 | HTTP_ERROR | An HTTP communication error has occurred. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 23 | RESPONSE_ERROR | An HTTP API response error has occurred. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 24 | RESPONSE_INVALID_CODE | Cannot find the HTTP API response code | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 25 | RESPONSE_VALUE_IS_NULL | The HTTP API response is empty. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 26 | RESPONSE_INVALID_VALUE_FORMAT | The HTTP API response format is incorrect. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 27 | LOG_81PLUG_ERROR | This code is not in use. | x | |
| 28 | UPDATE_81PLUG_FEED_ERROR | This code is not in use. | x | |
| 29 | ASYNC_OPERATION_IN_PROGRESS | An asynchronous task is currently in progress. | x | |
| 30 | BASE_UNINITIALIZED | The SDK has been uninitialized. | x | |
| 31 | NOT_SUPPORTED_COUNTRY | This feature is not currently supported in your country. | x | |
| — | 32 | Not used (skipped number) | x | |
| 33 | POPUP_NOT_CREATED | The 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~79 | Not in use (reserved section) | x | |
| 80 | VIEWUI_NOT_INITIALIZED | ViewUI has not been initialized. | x | |
| 81 | VIEWUI_UNINIT_FAILED | Failed to clean up ViewUI | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to create a WebView | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | Failed to load the URL | x | |
| 84 | WEBVIEW_CLOSED_BEFORE_PURCHASE | IAP_StartPurchase The WebView closed before the item purchase was completed while the API was running (WITH_WEBVIEW_AND_CONFIRM_RESULT option only) | O | The purchase was not completed successfully. Please try again. [OK] |
| 85 | PARAMETER_LENGTH_EXCEEDED | IAP_StartPurchase The length limit for the API parameter has been exceeded (serviceTxnNo has a 50-character limit, and extraData has a 500-character limit). | O | The payment information is invalid, so we cannot process the payment. Please try again. [OK] |
| 86 | INVALID_JSON_STRING | The string is not in JSON format. | O | The payment information is invalid, so we cannot process the payment. Please try again. [OK] |
| 87 | WEBVIEW_CREATE_COOKIE_FAIL | Failed to create a cookie | O | You 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] |
| 88 | INVALID_ORDER_PRODUCT_INFORMATION | The amount or quantity of the item you are trying to purchase is not a valid value. | O | The payment information is invalid, so we cannot process the payment. Please try again. [OK] |
| 89 | WEBVIEW_CLOSE_ALL_FAIL | Failed to close all WebViews | x | |
| 90 | WEBVIEW_CLOSE_FAIL | Failed to close WebView | x | |
| — | 91~250 | Not in use (reserved section) | x | |
| 251 | PCSDK_DLL_NOT_FOUND | The PC SDK DLL was not found. | x | |
| 252 | NOT_IMPLEMENTED | This feature has not been implemented. | x | |
| 253 | UNMANAGED_EXCEPTION | An unhandled exception has occurred. | O | A temporary problem has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | A managed exception has occurred. | O | A temporary issue has occurred. Please try again. [OK] |
| 255 | UNKNOWN_ERROR | An unknown error has occurred. | x |
If you see the code below, you must exit the game. The game cannot proceed normally.
19INVALID_ACCESS_TOKEN— Your login session has expired; you must close the game and restart it.
Example
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 theSDKResultCodefor 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
SDKResultCodein theStove::PCSDK::Lognamespace. A separate enumeration with the same name also exists in theStove::PCSDK::PCBangnamespace, 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 usingResult::GetSDKName().
Declaration
enum class SDKResultCode : uint32_t
{
SUCCESS = 0U,
FAIL = 1U,
// ... See the "Values" table below
LOG_SIZE_EXCEEDED = 86U,
};
Enum Values
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 1 | FAIL | Failure | x | |
| 2 | INVALID_CONFIG | The config file cannot be found. You need to check the path to the configuration file. | x | |
| 3 | INVALID_LOG_LEVEL | The log level value is invalid. Please check the log level settings. | x | |
| 4 | INVALID_LOG_PATH | The log path is invalid. You need to check the log path settings. | x | |
| 5 | INVALID_PARAM | No valid parameters were entered. Please check the call parameters. | x | |
| — | (6–15) | Not used (Skip) | x | |
| 16 | BASE_NOT_INITIALIZED | The SDK has not been initialized. You must first call Base_Initialize(). | x | |
| 17 | NOT_INITIALIZED | Initialization has not been performed. You must first call Log_Initialize(). | x | |
| 18 | ALREADY_INITIALIZED | It is already initialized. Please try again after calling Log_UnInitialize(). | x | |
| 19 | INVALID_ACCESS_TOKEN | The AccessToken cannot be found. Please verify your login status. | O | Your login session has expired. Please close the game and restart it. [OK] |
| 20 | NULL_TOKEN_ENTITY | The Token object cannot be found. Please check your login status. | x | |
| 21 | NULL_ENTITY | The object cannot be found at this time. | x | |
| 22 | HTTP_ERROR | An HTTP communication error has occurred. Please check your network connection and try again. | O | The network connection is not working properly. Please check your network connection and try again. [OK] |
| 23 | RESPONSE_ERROR | An HTTP API response error has occurred. Please try again. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 24 | RESPONSE_INVALID_CODE | The HTTP API response code cannot be found. Please try again. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 25 | RESPONSE_VALUE_IS_NULL | The HTTP API response is empty. Please try again. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 26 | RESPONSE_INVALID_VALUE_FORMAT | The HTTP API response format is invalid. Please try again. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| — | (27–28) | Not used (Skip) | x | |
| 29 | ASYNC_OPERATION_IN_PROGRESS | An asynchronous operation is currently in progress. Please try again once the operation is complete. | x | |
| 30 | BASE_UNINITIALIZED | The SDK has been uninitialized. You must call Base_Initialize() again and then try again. | x | |
| 31 | NOT_SUPPORTED_COUNTRY | This feature is not currently supported in your country. | x | |
| — | (32–79) | Not used (Skip) | x | |
| 80 | LOCAL_DB_CREATE_WORKING_DIRECTORY_FAILED | Failed to create the local DB working directory. Please check the local repository path and permissions. | x | |
| 81 | LOCAL_DB_CONNECT_FAILED | The connection to the local database failed. Please check the status of your local repository and try again. | x | |
| 82 | LOCAL_DB_CREATE_TABLE_FAILED | Failed to create a table in the local database. Please check the status of your local storage and try again. | x | |
| 83 | LOCAL_DB_DISCONNECT_FAILED | Failed to disconnect from the local database. Please check the status of the local repository and try again. | x | |
| 84 | LOCAL_DB_BACKUP_LOG_FAILED | The log backup to the local database failed. Please check the status of the local storage and try again. | x | |
| 85 | INVALID_LOG_PARAMETER | The parameters for calling the log transmission API are invalid. Please check the parameters in the call. | x | |
| 86 | LOG_SIZE_EXCEEDED | The 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 | |
| 251 | PCSDK_DLL_NOT_FOUND | The PC SDK DLL could not be found. Please check the SDK distribution file configuration. | x | |
| 252 | NOT_IMPLEMENTED | This feature has not been implemented. | x | |
| 253 | UNMANAGED_EXCEPTION | An unhandled exception has occurred. | O | There was a temporary issue. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | A managed exception has occurred. | O | There was a temporary issue. Please try again. [OK] |
| 255 | UNKNOWN_ERROR | An unknown error has occurred. | x |
If you receive the code below, you must exit the game. The game cannot proceed normally.
19INVALID_ACCESS_TOKEN— Your login session has expired; you'll need to restart the game after exiting.
Example
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~86are 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
SDKResultCodein theStove::PCSDK::PCBangnamespace. A separate enumeration with the same name also exists in theStove::PCSDK::Lognamespace, 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 usingResult::GetSDKName().
Declaration
enum class SDKResultCode : uint32_t
{
SUCCESS = 0U,
FAIL = 1U,
// ... See the "Values" table below
UNKNOWN_ERROR = 255U,
};
Enum Values
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 1 | FAIL | Failure | x | |
| 2 | INVALID_CONFIG | The config file cannot be found. You need to check the path to the configuration file. | x | |
| 3 | INVALID_LOG_LEVEL | The log level value is invalid. Please check the log level settings. | x | |
| 4 | INVALID_LOG_PATH | The log path is invalid. Please verify the log path settings. | x | |
| 5 | INVALID_PARAM | An incorrect parameter was entered. Please check the parameters in the calling code. | x | |
| — | (6–15) | Not used (Skip) | x | |
| 16 | BASE_NOT_INITIALIZED | The SDK has not been initialized. You must first call Base_Initialize(). | x | |
| 17 | NOT_INITIALIZED | Initialization has not been performed. You must first call PCBang_Initialize(). | x | |
| 18 | ALREADY_INITIALIZED | It is already initialized. Please try again after calling PCBang_UnInitialize(). | x | |
| 19 | INVALID_ACCESS_TOKEN | The AccessToken cannot be found. Please verify your login status. | O | Your login session has expired. Please close the game and restart it. [OK] |
| 20 | NULL_TOKEN_ENTITY | The token object cannot be found. Please verify your login status. | x | |
| 21 | NULL_ENTITY | The object cannot be found at this time. | x | |
| 22 | HTTP_ERROR | An HTTP communication error has occurred. Please check your network connection and try again. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 23 | RESPONSE_ERROR | An HTTP API response error occurred. Please try again. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 24 | RESPONSE_INVALID_CODE | The HTTP API response code cannot be found. Please try again. | O | The network connection is not working properly. Please check your network connection and try again. [OK] |
| 25 | RESPONSE_VALUE_IS_NULL | The HTTP API response is empty. Please try again. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 26 | RESPONSE_INVALID_VALUE_FORMAT | The HTTP API response format is incorrect. Please try again. | O | The network connection is unstable. Please check your network connection and try again. [OK] |
| 27 | LOG_81PLUG_ERROR | This code is not in use. | x | |
| 28 | UPDATE_81PLUG_FEED_ERROR | This code is not in use. | x | |
| 29 | ASYNC_OPERATION_IN_PROGRESS | An asynchronous operation is currently in progress. Please try again after the operation is complete. | x | |
| 30 | BASE_UNINITIALIZED | The SDK has been uninitialized. You must call Base_Initialize() again and then try again. | x | |
| 31 | NOT_SUPPORTED_COUNTRY | This feature is not currently supported in your country. | x | |
| — | (32–250) | Not used (Skip) | x | |
| 251 | PCSDK_DLL_NOT_FOUND | The PC SDK DLL could not be found. You need to check the SDK installation configuration. | x | |
| 252 | NOT_IMPLEMENTED | This feature has not been implemented. | x | |
| 253 | UNMANAGED_EXCEPTION | An unhandled exception has occurred. | O | There was a temporary issue. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | A managed exception has occurred. | O | There was a temporary issue. Please try again. [OK] |
| 255 | UNKNOWN_ERROR | An unknown error has occurred. | x |
If you receive the code below, you must exit the game. The game cannot proceed normally.
19INVALID_ACCESS_TOKEN— Your login session has expired; you'll need to restart the game after exiting.
Example
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 namedSDKResultCodealso exist in other modules, such as BaseSDK and IAPSDK, and the meaning of their values varies by namespace (module).
Declaration
enum class SDKResultCode : uint32_t
{
SUCCESS = 0U,
FAIL = 1U,
// ... See the "Values" table below
NO_POPUP_DATA = 87U,
};
Enum Values
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 1 | FAIL | Failure | x | |
| 2 | INVALID_CONFIG | The config file cannot be found | x | |
| 3 | INVALID_LOG_LEVEL | The log level value is invalid. | x | |
| 4 | INVALID_LOG_PATH | The log path is invalid. | x | |
| 5 | INVALID_PARAM | An incorrect parameter was entered. You must correct the call. | x | |
| 16 | BASE_NOT_INITIALIZED | The SDK has not been initialized. You must initialize the SDK first. | x | |
| 17 | NOT_INITIALIZED | Initialization has not been performed. You must first call View_Initialize()/View_InitializeWithWndInfo(). | x | |
| 18 | ALREADY_INITIALIZED | It is already initialized. You need to check whether it has been initialized more than once. | x | |
| 19 | INVALID_ACCESS_TOKEN | The AccessToken cannot be found | O | Your login session has expired. Please close the game and restart it. [OK] |
| 20 | NULL_TOKEN_ENTITY | The Token object cannot be found | x | |
| 21 | NULL_ENTITY | The object cannot be found at this time. | x | |
| 22 | HTTP_ERROR | An HTTP communication error has occurred. | x | |
| 23 | RESPONSE_ERROR | An HTTP API response error has occurred. | x | |
| 24 | RESPONSE_INVALID_CODE | Cannot find the HTTP API response code | x | |
| 25 | RESPONSE_VALUE_IS_NULL | The HTTP API response is empty. | x | |
| 26 | RESPONSE_INVALID_VALUE_FORMAT | The HTTP API response format is incorrect. | x | |
| 27 | LOG_81PLUG_ERROR | This code is not in use. | x | |
| 28 | UPDATE_81PLUG_FEED_ERROR | This code is not in use. | x | |
| 29 | ASYNC_OPERATION_IN_PROGRESS | An asynchronous operation is currently in progress. Please try again after the previous asynchronous operation has finished. | x | |
| 30 | BASE_UNINITIALIZED | The SDK has been uninitialized. | x | |
| 31 | NOT_SUPPORTED_COUNTRY | This feature is not currently available in your country. Please check whether it is supported in your country. | x | |
| — | 32 | Not used (skipped number) | x | |
| 33 | POPUP_NOT_CREATED | The 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 | |
| 251 | PCSDK_DLL_NOT_FOUND | The PC SDK DLL could not be found. | x | |
| 252 | NOT_IMPLEMENTED | This feature has not been implemented. | x | |
| 253 | UNMANAGED_EXCEPTION | An unhandled exception has occurred. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | A managed exception has occurred. | O | A temporary issue has occurred. Please try again. [OK] |
| 255 | UNKNOWN_ERROR | An unknown error has occurred. | x | |
| 80 | VIEWUI_NOT_INITIALIZED | ViewUI has not been initialized. You must verify whether the view has been initialized. | x | |
| 81 | VIEWUI_UNINIT_FAILED | Failed to clean up ViewUI | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to create a WebView | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | Failed to load the URL | x | |
| 84 | WEBVIEW_CLOSE_ALL_FAIL | Failed to close all WebViews | x | |
| 85 | WEBVIEW_CLOSE_FAIL | Failed to close WebView | x | |
| 86 | WEBVIEW_CREATE_COOKIE_FAIL | Failed to create a cookie | O | The page cannot be loaded. Please try again. [OK] |
| 87 | NO_POPUP_DATA | No pop-up data exists. | O | There 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.
19INVALID_ACCESS_TOKEN— Your login session has expired; you must close the game and restart it.
Example
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 theonDestroycallback 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
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
| Code | Name | Description |
|---|---|---|
| 0 | system | System (Follows system settings) |
| 1 | en | English |
| 2 | ko | Korean |
| 3 | ja | Japanese |
| 4 | zh_cn | Chinese (Simplified, People's Republic of China) |
| 5 | zh_tw | Chinese (Traditional, Taiwan) |
| 6 | de | German |
| 7 | fr | French |
| 8 | es | Spanish, Castilian |
| 9 | pt | Portuguese |
| 10 | th | Thai |
| 11 | vi | Vietnamese |
Example
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 fromBase_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
namespace Stove
{
namespace PCSDK
{
namespace Base
{
enum class StoveOverlayState : uint32_t
{
SHOW = 0,
HIDE = 1,
EXPANDED = 2,
};
}
}
}
Enum Values
| Code | Name | Description |
|---|---|---|
| 0 | SHOW | Displays the overlay. |
| 1 | HIDE | Hides the overlay. |
| 2 | EXPANDED | Expand the overlay. |
Example
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
- It is used in both the StovePCVietnamAgeRatingInfo and StovePCVietnamOverimmersionInfo callbacks.
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
namespace Stove
{
namespace PCSDK
{
namespace PCBang
{
struct StovePCBangStatus
{
public:
PCBangPremium GetPremiumStatus() const;
int32_t GetPCBangSerialNumber() const;
int32_t GetProductCode() const;
};
}
}
}
Members
| Name | Type | Access | Description |
|---|---|---|---|
GetPremiumStatus() | PCBangPremium | Read | Here is a user benefit code. |
GetPCBangSerialNumber() | int32_t | Read | PC Bang is the unique identifier. |
GetProductCode() | int32_t | Read | PC Bang is the product code. |
Example
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
- It is passed as a callback argument to PCBang_CheckPCBangStatus().
- The callback runs on the thread that called
Base_RunCallback(). - Please refer to benefit code PCBangPremium.
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
namespace Stove
{
namespace PCSDK
{
namespace PCBang
{
struct StovePCBangUserLogin
{
public:
PCBangPremium GetPremiumStatus() const;
int32_t GetPCBangSerialNumber() const;
int32_t GetRemainTime() const;
};
}
}
}
Members
| Name | Type | Access | Description |
|---|---|---|---|
GetPremiumStatus() | PCBangPremium | Read | This is a user benefit code. It will not be delivered if the attempt fails. |
GetPCBangSerialNumber() | int32_t | Read | PC Bang is the unique ID. It will not be passed if the operation fails. |
GetRemainTime() | int32_t | Read | PC Bang Time remaining for the Premium plan. If the transaction fails, the message will not be delivered. |
Example
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
Setteris 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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetChargeDeductVal() / SetChargeDeductVal() | double | Reading and Writing | This is the payment amount. |
GetChargeDisplayDeductVal() / SetChargeDisplayDeductVal() | double | Reading and Writing | This is the cash conversion price based on the settlement price. |
GetChargeType() / SetChargeType() | int32_t | Reading and Writing | These are payment method codes. 98: STOVE Cash, 99: Points, and others: PG payment methods. |
GetChargeTypeName() / SetChargeTypeName() | const wchar_t* | Reading and Writing | This is the name of the payment method. |
Example
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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetCategoryId() / SetCategoryId() | const wchar_t* | Reading and Writing | This 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_t | Reading and Writing | This is the page number when viewing product information. If not specified, the default value is 1. |
GetPageSize() / SetPageSize() | int32_t | Reading and Writing | This 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
using namespace Stove::PCSDK;
using namespace Stove::PCSDK::IAP;
StovePCFetchProductParam param;
param.SetCategoryId(L"");
param.SetPageNumber(1);
param.SetPageSize(20);
IAP_FetchProducts(¶m, OnFetchProductsFinished);
Notes
- Please pass the
GetCategoryId()value of StovePCShopCategory toCategoryIdas-is. IAP_FetchProducts()returns the StovePCProduct array, andIAP_FetchProductsEx()returns the StovePCProductEx array via a callback.
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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetWorldId() / SetWorldId() | const wchar_t* | Reading and Writing | This is the game's world identifier. |
GetCharacterNumber() / SetCharacterNumber() | int64_t | Reading and Writing | This is a character identifier. |
Example
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
worldIdandcharacterNumber.
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
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
| Name | Type | Access | Description |
|---|---|---|---|
IsDefault() | bool | Read | Returns 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* | Read | This 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* | Read | If the country is subject to regulations such as the GDPR, the name of the regulated country is returned. |
GetTimeZone() | const wchar_t* | Read | Returns the ID based on the IANA Time Zone Database (TZDB), commonly known as the "Time Zone ID." |
GetUtcOffset() | int32_t | Read | Returns the UTC offset information in minutes based on the time zone ID. |
GetLanguage() | const wchar_t* | Read | Returns 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
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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetEnvironment() / SetEnvironment() | const wchar_t* | Reading and Writing | This is the "Stove Environment" value. |
GetGameID() / SetGameID() | const wchar_t* | Reading and Writing | This is the Stove Game ID. |
GetApplicationKey() / SetApplicationKey() | const wchar_t* | Reading and Writing | This is the Stove Application key value. |
Example
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 andBase_Initialize()share this feature. - If you need extended fields such as
waitTimeMillisec,launchLauncher, or the platform name, please useBase_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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetEnvironment() / SetEnvironment() | const wchar_t* | Reading and Writing | These are the Stove Environment values. |
GetGameID() / SetGameID() | const wchar_t* | Reading and Writing | This is the Stove Game ID. |
GetApplicationKey() / SetApplicationKey() | const wchar_t* | Reading and Writing | This is the Stove Application key value. |
GetWaitTimeMillisec() / SetWaitTimeMillisec() | uint32_t | Reading and Writing | This is the wait time (in milliseconds). |
GetLaunchLauncher() / SetLaunchLauncher() | bool | Reading and Writing | Whether the launcher is running. |
GetPlatformName() / SetPlatformName() | const wchar_t* | Reading and Writing | This is the name of the platform (e.g., Stove, Steam). |
Example
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(). UnlikeBase_RestartAppIfNecessaryAsyncEx(), which acceptswaitTimeMillisecandlaunchLauncheras separate arguments, this single structure contains all the options. - Although the source code contains reserved fields (
reserved1toreserved5) 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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetTransactionMasterNumber() | int64_t | Read | This is the unique master number for the transaction. |
GetTransactionDetailNumber() | int64_t | Read | This is the unique transaction ID. |
GetProductId() | int64_t | Read | This is the platform product ID. |
GetGameItemId() | const wchar_t* | Read | This is the in-game item ID mapped to the product ID. |
GetProductName() | const wchar_t* | Read | Product Name. |
GetQuantity() | int32_t | Read | Quantity. This is the quantity provided in the purchase request. |
GetThumbnailUrl() | const wchar_t* | Read | This is the URL for the featured product image. |
Example
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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetAuid() / SetAuid() | int64_t | Reading and Writing | A unique ID for each account (if the game supports this concept). |
GetCuid() / SetCuid() | int64_t | Reading and Writing | This is a unique ID for each character (if the game supports this concept). |
Marketing Integration Information
| Name | Type | Access | Description |
|---|---|---|---|
GetMktType1() / SetMktType1() | const wchar_t* | Reading and Writing | This is the name of the integrated third-party marketing service (1). |
GetMktId1() / SetMktId1() | const wchar_t* | Reading and Writing | This is the unique key value associated with the integrated third-party marketing service (1). |
GetMktType2() / SetMktType2() | const wchar_t* | Reading and Writing | Names of integrated third-party marketing services (2). |
GetMktId2() / SetMktId2() | const wchar_t* | Reading and Writing | This is the unique key value associated with the integrated third-party marketing service (2). |
Game · Server Context
| Name | Type | Access | Description |
|---|---|---|---|
GetGameVersion() / SetGameVersion() | const wchar_t* | Reading and Writing | This is the game build version. |
GetServerCd() / SetServerCd() | const wchar_t* | Reading and Writing | This is the server code (if the game includes a server component). |
GetServerCdDet() / SetServerCdDet() | const wchar_t* | Reading and Writing | Here are the server code details (if the game provides server details). |
GetLvCd() / SetLvCd() | const wchar_t* | Reading and Writing | This is the level information at the time the log was recorded (per account). |
GetLvCdDet() / SetLvCdDet() | const wchar_t* | Reading and Writing | This is the level information at the time the log was recorded (per character). |
Log Group · Main Text
| Name | Type | Access | Description |
|---|---|---|---|
GetLogGroupId() / SetLogGroupId() | const wchar_t* | Reading and Writing | This is the Log Group ID used to map logs that should be grouped together. |
GetContents() / SetContents() | const wchar_t* | Reading and Writing | This field is used to send data other than the fields listed above as a JSON string. |
Example
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 ofLvCd(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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetProductId() / SetProductId() | int64_t | Reading and Writing | This is the platform product ID. |
GetSalePrice() / SetSalePrice() | double | Reading and Writing | This is the selling price of the product. |
GetQuantity() / SetQuantity() | int32_t | Reading and Writing | Quantity. |
Example
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 toProductIdas-is. - Since
SalePriceis compared to the price observed by the server at the time of purchase, you must pass theGetSalePrice()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
namespace Stove
{
namespace PCSDK
{
namespace Base
{
struct StovePCOverImmersion
{
public:
const wchar_t* GetWarningMessage() const;
int32_t GetElapsedTimeInHours() const;
int32_t GetMinExposureTimeInSeconds() const;
};
}
}
}
Members
| Name | Type | Access | Description |
|---|---|---|---|
GetWarningMessage() | const wchar_t* | Read | This is a warning about excessive engagement. |
GetElapsedTimeInHours() | int32_t | Read | This is the game elapsed time (in hours). |
GetMinExposureTimeInSeconds() | int32_t | Read | This is the minimum display time (in seconds) for the message. |
Example
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 usingIAP_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
enum class StovePCPaymentOperation : uint32_t
{
DEFAULT = 0,
WITH_WEBVIEW = 1,
_MAX_COUNT
};
Enum Values
| Code | Name | Description |
|---|---|---|
| 0 | DEFAULT | This 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. |
| 1 | WITH_WEBVIEW | Open the Stove web payment page via Stove Webview and proceed to purchase game cash. |
| 2 | _MAX_COUNT | Not used (This value indicates the end of the enumeration and is not a valid operation.) |
Example
using namespace Stove::PCSDK::IAP;
StovePCPaymentOption options;
options.SetOperation(StovePCPaymentOperation::WITH_WEBVIEW);
Notes
- If you set it to
WITH_WEBVIEW, theWebviewMode/WebviewRectsettings inStovePCPaymentOptionwill 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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetOperation() / SetOperation() | StovePCPaymentOperation | Reading and Writing | IAP_StartPayment() This is how it works when executed. |
GetWebviewMode() / SetWebviewMode() | WebViewMode | Reading and Writing | This type applies when using Stove Webview. It applies when Operation != DEFAULT. |
GetWebviewRect() / SetWebviewRect() | int32_t x, y, width, height | Reading and Writing | Sets 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
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 useIAP_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
class StovePCPopupDisallowed
{
public:
StovePCPopupDisallowed();
uint32_t GetPopupId() const;
void SetPopupId(uint32_t popupId);
uint32_t GetDays() const;
void SetDays(uint32_t days);
};
Members
| Name | Type | Access | Accessor | Description |
|---|---|---|---|---|
popupId | uint32_t | Reading and Writing | GetPopupId() / SetPopupId(uint32_t) | The ID of the popup that should not be displayed |
days | uint32_t | Reading and Writing | GetDays() / SetDays(uint32_t) | Number of days without pop-ups |
Example
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.
popupIdis 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_FetchProductsbase 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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetProductId() | int64_t | Read | This is the platform product ID. |
GetGameItemId() | const wchar_t* | Read | This is the in-game item ID mapped to the product ID. |
GetName() | const wchar_t* | Read | Product Name. |
GetDescription() | const wchar_t* | Read | Product Details. |
GetQuantity() | int32_t | Read | This is the quantity of each individual item. |
GetProductTypeCode() | ProductTypeCode | Read | These are item type codes. |
GetCategoryId() | const wchar_t* | Read | This is the category ID. |
GetCategoryName() | const wchar_t* | Read | This is the category name. |
GetThumbnailUrl() | const wchar_t* | Read | This is the URL for the featured product image. |
Price
| Name | Type | Access | Description |
|---|---|---|---|
GetCurrencyCode() | const wchar_t* | Read | This is the currency code. It is used to display product prices. |
GetPrice() | double | Read | This is the product's list price (checkout price). Please use this only to display the product's list price. |
GetDisplayPrice() | double | Read | This is the list price (display price). It is not currently in use. |
GetDisplayPriceString() | const wchar_t* | Read | This is the product list price text (display). Please use it only for displaying the list price. |
GetSalePrice() | double | Read | This 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() | double | Read | This is the product selling price (display). It is currently not in use. |
GetDisplaySalePriceString() | const wchar_t* | Read | The 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
| Name | Type | Access | Description |
|---|---|---|---|
IsDiscount() | bool | Read | Whether there is a discount. |
GetDiscountType() | DiscountType | Read | This is a discount type. |
GetDiscountTypeValue() | int32_t | Read | This is the discounted price. |
GetDiscountBeginDate() | int64_t | Read | This is the discount start date (epoch time in milliseconds). |
GetDiscountEndDate() | int64_t | Read | This is the discount expiration date (epoch time in milliseconds). |
Purchase Quantity and History
| Name | Type | Access | Description |
|---|---|---|---|
GetTotalQuantity() | int32_t | Read | This is the total number of items sold. |
GetMemberQuantity() | int32_t | Read | This is the member's purchase quantity. This is the purchase quantity for each logged-in account. |
GetGuidQuantity() | int32_t | Read | This is the purchase quantity for the GUID. It represents the unique purchase quantity per account in the game. |
CanWithdraw() | bool | Read | Whether it is possible to withdraw a subscription application. |
GetPurchasedAtLeastOnce() | bool | Read | Whether a purchase was made. If there is at least one purchase in the history, the value is true. |
Purchase Limits and Sales Periods
| Name | Type | Access | Description |
|---|---|---|---|
GetPurchaseLimitTypeCode() | PurchaseLimitTypeCode | Read | This is a type of purchase restriction. |
GetPurchaseLimitCount() | int32_t | Read | This is the sales limit. If the value of GetPurchaseLimitTypeCode() is CHARACTER, this is the limit per member. |
GetSaleLimitCount() | int32_t | Read | This is the total sales limit. If the value is 0, there is no limit. |
GetSaleBeginDate() | int64_t | Read | The start date of the sale (epoch time in milliseconds). If the sale is ongoing, returns 0. |
GetSaleEndDate() | int64_t | Read | This is the end date of the sale (epoch time in milliseconds). If the sale is ongoing, it returns 0. |
Example
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), andGetDisplayPrice()/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 toSalePricein 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
namespace Stove
{
namespace PCSDK
{
namespace IAP
{
struct StovePCProductEx
{
public:
// To access members, use the getter methods in the "Fields" section below.
};
}
}
}
Members
Basic Information
| Name | Type | Access | Description |
|---|---|---|---|
GetProductId() | int64_t | Read | This is the platform product ID. |
GetGameItemId() | const wchar_t* | Read | This is the in-game item ID mapped to the product ID. |
GetName() | const wchar_t* | Read | Product Name. |
GetDescription() | const wchar_t* | Read | Product Details. |
GetQuantity() | int32_t | Read | This is the quantity of each individual item. |
GetProductTypeCode() | ProductTypeCode | Read | These are item type codes. |
GetCategoryId() | const wchar_t* | Read | This is the category ID. |
GetCategoryName() | const wchar_t* | Read | This is the category name. |
GetThumbnailUrl() | const wchar_t* | Read | This is the URL for the featured product image. |
Price
| Name | Type | Access | Description |
|---|---|---|---|
GetCurrencyCode() | const wchar_t* | Read | This is the currency code. It is used to display product prices. |
GetPrice() | double | Read | This is the product's list price (payment price). Please use this only to display the product's list price. |
GetDisplayPrice() | double | Read | This is the list price (display price). It is not currently in use. |
GetDisplayPriceString() | const wchar_t* | Read | This is the product list price string (display). Please use it only for displaying the list price. |
GetSalePrice() | double | Read | This 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() | double | Read | This is the product sales price (display). It is currently not in use. |
GetDisplaySalePriceString() | const wchar_t* | Read | The 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
| Name | Type | Access | Description |
|---|---|---|---|
IsDiscount() | bool | Read | Whether there is a discount. |
GetDiscountType() | DiscountType | Read | This is a discount type. |
GetDiscountTypeValue() | int32_t | Read | This is the discounted price. |
GetDiscountBeginDate() | int64_t | Read | This is the discount start date (epoch time in milliseconds). |
GetDiscountEndDate() | int64_t | Read | This is the discount expiration date (epoch time in milliseconds). |
Purchase Quantity and History
| Name | Type | Access | Description |
|---|---|---|---|
GetTotalQuantity() | int32_t | Read | This is the total number of items sold. |
GetMemberQuantity() | int32_t | Read | This is the member's purchase quantity. This is the purchase quantity for each logged-in account. |
GetGuidQuantity() | int32_t | Read | This is the purchase quantity for the GUID. It represents the unique purchase quantity per account in the game. |
CanWithdraw() | bool | Read | Whether it is possible to withdraw a subscription application. |
GetPurchasedAtLeastOnce() | bool | Read | Whether a purchase was made. If there is at least one purchase in the purchase history, the value is true. |
Purchase Limits and Sales Periods
| Name | Type | Access | Description |
|---|---|---|---|
GetPurchaseLimitTypeCode() | PurchaseLimitTypeCode | Read | This is a type of purchase restriction. |
GetPurchaseLimitCount() | int32_t | Read | This is the sales limit. If the value of GetPurchaseLimitTypeCode() is CHARACTER, this is the limit per member. |
GetSaleLimitCount() | int32_t | Read | This is the total sales limit. If the value is 0, there is no limit. |
GetSaleBeginDate() | int64_t | Read | The start date of the sale (epoch time in milliseconds). If the sale is ongoing, it returns 0. |
GetSaleEndDate() | int64_t | Read | This is the end date of the sale (epoch time in milliseconds). If the sale is ongoing, it returns 0. |
GetPurchaseAvailabilityCode() | int16_t | Read | This 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
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), andGetDisplayPrice()/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 toSalePricein 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
Setteris 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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetTransactionDetailNumber() / SetTransactionDetailNumber() | int64_t | Reading and Writing | This is the purchase detail number (TID of the purchased item). |
GetProductId() / SetProductId() | int64_t | Reading and Writing | This is the platform product ID. |
GetCategoryId() / SetCategoryId() | const wchar_t* | Reading and Writing | This is the category ID. |
GetTotalQuantity() / SetTotalQuantity() | int32_t | Reading and Writing | This is the total number of items sold. |
GetMemberQuantity() / SetMemberQuantity() | int32_t | Reading and Writing | This is the member's purchase quantity. |
GetGuidQuantity() / SetGuidQuantity() | int32_t | Reading and Writing | This is the quantity of GUIDs purchased. |
Example
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'sOperationisWITH_WEBVIEW_AND_CONFIRM_RESULTand 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
enum class StovePCPurchaseOperation : uint32_t
{
DEFAULT = 0,
WITH_WEBVIEW = 1,
WITH_WEBVIEW_AND_CONFIRM_RESULT = 2,
_MAX_COUNT
};
Enum Values
| Code | Name | Description |
|---|---|---|
| 0 | DEFAULT | This 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. |
| 1 | WITH_WEBVIEW | Open 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. |
| 2 | WITH_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_COUNT | Not used (This value indicates the end of the enumeration and is not a valid operation.) |
Example
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_WEBVIEWandWITH_WEBVIEW_AND_CONFIRM_RESULT, theWebviewMode/WebviewRectsettings forStovePCPurchaseOptionwill 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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetOperation() / SetOperation() | StovePCPurchaseOperation | Reading and Writing | IAP_StartPurchase() This is how it works when executed. |
GetWebviewMode() / SetWebviewMode() | WebViewMode | Reading and Writing | This type applies when using Stove Webview. It applies when Operation != DEFAULT. |
GetWebviewRect() / SetWebviewRect() | int32_t x, y, width, height | Reading and Writing | Sets 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
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 callIAP_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
OperationisDEFAULTorWITH_WEBVIEW, thenOneTimePaymentUrlis filled in. OperationisWITH_WEBVIEW_AND_CONFIRM_RESULT, and if the payment is successful,Purchased,PurchasedProducts, andChargeInfoswill 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, andChargeInfosare 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
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.
| Name | Type | Access | Description |
|---|---|---|---|
GetTransactionMasterNumber() | int64_t | Read | This is the unique transaction master number (settlement TID). |
CreateTransactionDetailNumberList() / GetTransactionDetailNumbers() / SetTransactionDetailNumber() / GetTransactionDetailNumberCount() | int64_t Array | Reading and Writing | Here is the list of purchase detail numbers (purchased item TIDs) (transactionDetailNumbers) and quantities (transactionDetailNumberCount). |
GetOneTimePaymentUrl() | const wchar_t* | Read | This is a one-time payment URL. It is populated when Operation is DEFAULT or WITH_WEBVIEW. |
GetPurchaseProgress() | PurchaseProgress | Read | The purchase is in progress. |
IsPurchased() | bool | Read | Here 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* | Read | This is an echo of the ExtraData string passed when calling IAP_StartPurchase(). |
CreatePurchasedProductList() / GetPurchasedProduct() / SetPurchasedProduct() / GetPurchasedProductCount() | StovePCPurchasedProduct Array | Reading and Writing | Here 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 Array | Reading and Writing | This is a list of the items purchased (chargeInfos) and their quantities (chargeInfoCount). |
Example
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
- It is passed only as the output of IAP_StartPurchase.
- If
PurchaseProgressisNEED_PAYMENT_WINDOW, open the payment window atOneTimePaymentUrl, and after completing the payment, confirm the purchase at IAP_ConfirmPurchase. ExtraDatareturns theExtraDataof StovePCStartPurchaseParam as-is.
See Also
- StovePCStartPurchaseParam
- StovePCPurchaseOption
- StovePCPurchasedProduct
- StovePCChargeInfo
- IAP_StartPurchase
- IAP_ConfirmPurchase
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
namespace Stove
{
namespace PCSDK
{
namespace PCBang
{
struct StovePCRefreshUserBenefits
{
public:
PCBangPremium GetPremiumStatus() const;
int32_t GetRemainTime() const;
};
}
}
}
Members
| Name | Type | Access | Description |
|---|---|---|---|
GetPremiumStatus() | PCBangPremium | Read | This is a user benefit code. It will not be delivered if the transaction fails. |
GetRemainTime() | int32_t | Read | PC Bang Time remaining on your Premium subscription. This message will not be delivered if the delivery fails. |
Example
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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetCategoryId() | const wchar_t* | Read | This is the category ID. |
GetParentCategoryId() | const wchar_t* | Read | This is the parent category ID. |
GetDisplayNumber() | int32_t | Read | This is the order in which categories are displayed. |
GetName() | const wchar_t* | Read | This is the category name. |
GetDepth() | int32_t | Read | This refers to the depth of the hierarchical structure. |
Example
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
namespace Stove
{
namespace PCSDK
{
namespace Base
{
struct StovePCShutdown
{
public:
int32_t GetInadvanceTimeInMinutes() const;
const wchar_t* GetShutdownMessage() const;
int32_t GetExposureTimeInSeconds() const;
};
}
}
}
Members
| Name | Type | Access | Description |
|---|---|---|---|
GetInadvanceTimeInMinutes() | int32_t | Read | This is the time remaining (in minutes) until the user's shutdown. |
GetShutdownMessage() | const wchar_t* | Read | This is a shutdown notification message. |
GetExposureTimeInSeconds() | int32_t | Read | This is the message display time (in seconds). |
Example
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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetPersonVerify() | bool | Read | This refers to whether you have completed identity verification. |
GetEmailVerify() | bool | Read | This refers to whether email verification has been completed. |
GetNationality() | const wchar_t* | Read | These are the country codes for countries registered on the Stove platform (ISO 3166-1 ALPHA-2 CODE). |
GetProviderCode() | const wchar_t* | Read | This 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() | int | Read | This 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
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()andGetAccountType()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
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].
| Name | Type | Access | Description |
|---|---|---|---|
CreateOrderProduct() / GetOrderProduct() / SetOrderProduct() / GetOrderProductCount() | StovePCOrderProduct Array | Reading and Writing | Here is the list of products to purchase (products) and their quantities (productsCount). |
GetPurchaseOption() / SetPurchaseOption() | StovePCPurchaseOption | Reading and Writing | These are the API execution options. |
GetServiceTxnNo() / SetServiceTxnNo() | const wchar_t* | Reading and Writing | This 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 Writing | This 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
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 callingCreateOrderProduct()may result in undefined behavior. Please first assign the value usingCreateOrderProduct()for each element in the array. - Depending on the value of
OperationinPurchaseOption, 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
enum class StovePCTermsOperation : uint32_t
{
DEFAULT = 0,
WITH_WEBVIEW = 1,
_MAX_COUNT
};
Enum Values
| Code | Name | Description |
|---|---|---|
| 0 | DEFAULT | This 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. |
| 1 | WITH_WEBVIEW | Open a web page via Stove Webview and agree to the terms and conditions. |
| 2 | _MAX_COUNT | Not used (This value indicates the end of the enumeration and is not a valid operation.) |
Example
using namespace Stove::PCSDK::IAP;
StovePCTermsOption options;
options.SetOperation(StovePCTermsOperation::WITH_WEBVIEW);
Notes
- If you set it to
WITH_WEBVIEW, theWebviewMode/WebviewRectsettings inStovePCTermsOptionwill 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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetOperation() / SetOperation() | StovePCTermsOperation | Reading and Writing | IAP_FetchTermsAgreement() This describes how it works when executed. |
GetWebviewMode() / SetWebviewMode() | WebViewMode | Reading and Writing | This type applies when using Stove Webview. It takes effect when Operation != DEFAULT. |
GetWebviewRect() / SetWebviewRect() | int32_t x, y, width, height | Reading and Writing | Sets 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
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
namespace Stove
{
namespace PCSDK
{
namespace Base
{
struct StovePCToken
{
public:
const wchar_t* GetAccessToken() const;
int32_t GetExpireIn() const;
};
}
}
}
Members
| Name | Type | Access | Description |
|---|---|---|---|
GetAccessToken() | const wchar_t* | Read | This is the Stove AccessToken value. |
GetExpireIn() | int32_t | Read | This is the remaining expiration time (in seconds) for the AccessToken. |
Example
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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetSessionId() | const wchar_t* | Read | This is the session ID that is issued each time the PCSDK is initialized. |
GetRefSessionId() | const wchar_t* | Read | This is the session ID issued each time a reference (launcher or SGA) is run. |
GetUUID() | const wchar_t* | Read | This is an ID issued to identify a web browser. |
GetServiceProtocol() | const wchar_t* | Read | This is the protocol used when the reference (launcher or SGA) is first launched. |
GetRefSourceType() | const wchar_t* | Read | This is the source type of a reference (launcher or SGA). |
Example
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
namespace Stove
{
namespace PCSDK
{
namespace Base
{
struct StovePCUser
{
public:
uint64_t GetMemberNumber() const;
const wchar_t* GetNickname() const;
uint64_t GetGameUserId() const;
};
}
}
}
Members
| Name | Type | Access | Description |
|---|---|---|---|
GetMemberNumber() | uint64_t | Read | This 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* | Read | This is the Stove username of the user logged in to the launcher. |
GetGameUserId() | uint64_t | Read | This is the gameUserId of the user logged in to the launcher. |
Example
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 useGetGameUserId()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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetOverlayState() | StoveOverlayState | Read | The overlay is currently displayed. |
GetOverlayType() | int | Read | This is the overlay type. 0 = black, 1 = white. |
GetOverlayScale() | float | Read | This is the overlay size (0.0 to 1.0). |
GetOverlayOpacity() | float | Read | This is the overlay opacity (0.0 to 1.0). |
GetAgeRating() | int | Read | These 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* | Read | This is a message regarding age ratings. |
GetDisplayPositionX() | float | Read | This is the message display position (x-coordinate). |
GetDisplayPositionY() | float | Read | This is the message display position (y-coordinate). |
GetLanguage() | const wchar_t* | Read | This is a language code (e.g., "ko", "en", "ja", "vi", "zh-cn", "zh-tw", "th"). |
Example
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 (
reserved1–reserved10) 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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetOverlayState() | StoveOverlayState | Read | The overlay is currently displayed. |
GetOverlayType() | int | Read | This is an overlay type. 0 = black, 1 = white. |
GetOverlayScale() | float | Read | This is the overlay size (0.0 to 1.0). |
GetOverlayOpacity() | float | Read | This is the overlay opacity (0.0 to 1.0). |
GetAgeRating() | int | Read | These 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* | Read | This is a warning about excessive engagement. |
GetStyledMessage() | const wchar_t* | Read | This is a design-related warning message about excessive immersion, which includes markup tags such as <b> and <color=#RRGGBBAA>. |
GetElapsedTime() | int32_t | Read | This is the elapsed game time (in minutes). |
GetExposureTime() | int32_t | Read | This is the message display time (in seconds). |
GetExpandAnimationTime() | float | Read | This is the duration of the Expand animation (in seconds). |
GetDisplayPositionX() | float | Read | This is the message's display position (x-coordinate). |
GetDisplayPositionY() | float | Read | This is the y-coordinate of the message's display position. |
GetLanguage() | const wchar_t* | Read | This is a language code (e.g., "ko," "en," "ja," "vi," "zh-cn," "zh-tw," "th"). |
Example
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, andGetStyledMessage()is design text that includes markup tags. Please choose the appropriate one for your needs.- Reserved fields for future expansion (
reserved1throughreserved10) 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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetTid() | int64_t | Read | This is the order number issued by the STOVE billing system. |
GetMarketCode() | const wchar_t* | Read | This is the market code. |
GetProductId() | const wchar_t* | Read | These are the product codes registered on the STOVE platform. |
GetMarketProductId() | const wchar_t* | Read | This is the product code listed on the marketplace. |
GetUserId() | const wchar_t* | Read | This is the user ID for the current game. |
GetCharacterNo() | int64_t | Read | This is a unique key issued for each game character on the STOVE platform. |
GetPurchaseMillis() | int64_t | Read | This is the payment time (epoch time in milliseconds) based on UTC+0. |
GetVoidedMillis() | int64_t | Read | This is the time (epoch time in milliseconds) when the refund was processed, based on UTC+0. |
Example
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
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
| Name | Type | Access | Description |
|---|---|---|---|
GetTid() | int64_t | Read | This is the order number issued by the STOVE billing system. |
GetMarketCode() | wchar_t* | Read | This is the market code. |
GetMemberNo() | int64_t | Read | This is your STOVE platform member number. |
GetGuid() | wchar_t* | Read | The guid of the STOVE platform member. |
GetCharacterNo() | int64_t | Read | This is a unique key issued for each game character (issued by STOVE). |
GetInserviceItemId() | wchar_t* | Read | This is the in-game item ID (same as ProductId). |
GetMarketItemId() | wchar_t* | Read | This is the item ID listed in the Marketplace (same as MarketProductId). |
GetMarketTid() | wchar_t* | Read | This is the Market order number. We do not offer a mobile Market; currently, we only offer STEAM. |
GetMarketUserId() | wchar_t* | Read | This is your Market account ID. We do not offer a mobile version of the Market; currently, it is available only on Steam. |
GetPurchaseDt() | int64_t | Read | This is the settlement time (UTC). |
GetVoidedDt() | int64_t | Read | This 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
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
enum class StovePCVoidedPurchasesMarketType : uint32_t
{
ALL = 0,
STEAM = 1,
GOOGLE_PLAY = 2,
APPLE_APP_STORE = 3
};
Enum Values
| Code | Name | Description |
|---|---|---|
| 0 | ALL | View All Markets |
| 1 | STEAM | View Steam Market |
| 2 | GOOGLE_PLAY | Google Play Store Views |
| 3 | APPLE_APP_STORE | Apple App Store Search |
Example
using namespace Stove::PCSDK::IAP;
IAP_FetchVoidedPurchasesEx(StovePCVoidedPurchasesMarketType::STEAM, OnFetchVoidedPurchasesExFinished);
Notes
- Due to the nature of the PC SDK,
STEAMorALLare typically used.GOOGLE_PLAYandAPPLE_APP_STOREare 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
void View_AutoPopup(Base::WebViewMode mode, OnPopupFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
mode | Base::WebViewMode | Y | Modes for running WebView |
onFinished | OnPopupFinished | Y | Callback function that receives the results of running WebView |
Returns
None
Callback
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Call 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success (All WebViews created successfully, or the WebView closed normally in onDestroy) | x | |
| 17 | NOT_INITIALIZED | The BaseSDK has not been initialized. | x | |
| 33 | POPUP_NOT_CREATED | The app terminated without creating any WebViews. It is passed to the onDestroy callback only once, but is not passed to the onFinished callback. | x | |
| 80 | VIEWUI_NOT_INITIALIZED | The internal WebView UI for displaying pop-ups has not been initialized. | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to create the WebView (including cases where only some pop-ups failed to create). | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | The WebView was unable to load the URL. | x | |
| 84 | WEBVIEW_CLOSE_ALL_FAIL | Before displaying a new pop-up, the system failed to close all previously open web views. | x | |
| 85 | WEBVIEW_CLOSE_FAIL | Failed to close the WebView at onDestroy. | x | |
| 87 | NO_POPUP_DATA | There is no pop-up data to display. | O | There is no pop-up configuration information, so there is no window to display. [OK] |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
onFinished's callbackResult | SDK | It is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately. |
Example
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
| Version | Change |
|---|---|
| 3.0.0.4 | First Published |
| 3.3.4 | NO_POPUP_DATA(87) Add result code |
See Also
- View_AutoPopupEx
- View_ManualPopup
- View_NewsPopup
- View_CouponPopup
- View_CloseAllPopups
- SDKMethod
- SDKResultCode
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
void View_AutoPopupEx(Base::WebViewMode mode, OnPopupFinished onFinished, OnViewPopupDestroyFinished onDestroy);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
mode | Base::WebViewMode | Y | Modes for running WebView |
onFinished | OnPopupFinished | Y | Callback function that receives the results of a WebView execution |
onDestroy | OnViewPopupDestroyFinished | N | A callback function pointer that is called when the popup is closed |
Returns
None
Callback
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
typedef void(__cdecl* OnViewPopupDestroyFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Call 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success (All WebViews were created successfully, or the WebView closed normally in onDestroy) | x | |
| 17 | NOT_INITIALIZED | The BaseSDK has not been initialized. | x | |
| 33 | POPUP_NOT_CREATED | The 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 | |
| 80 | VIEWUI_NOT_INITIALIZED | The internal WebView UI for displaying pop-ups has not been initialized. | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to create the WebView (including cases where only some pop-ups failed to create). | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | The WebView was unable to load the URL. | x | |
| 84 | WEBVIEW_CLOSE_ALL_FAIL | Before displaying a new pop-up, the system failed to close all previously open web views. | x | |
| 85 | WEBVIEW_CLOSE_FAIL | Failed to close the WebView at onDestroy. | x | |
| 87 | NO_POPUP_DATA | There is no pop-up data to display. | O | There is no pop-up configuration information, so there is no window to display. [OK] |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary problem has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
onFinished/onDestroy's callbackResult | SDK | It is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to manually free it. |
Example
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
onFinishedandonDestroyare 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
Result View_CloseAllPopups();
Parameters
None
Returns
| Type | Description |
|---|---|
Result | Function call result. Check whether the call succeeded using result.IsSuccessful(). |
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success (All open WebViews were closed successfully) | x | |
| 80 | VIEWUI_NOT_INITIALIZED | The internal WebView UI for displaying pop-ups has not been initialized. | x | |
| 84 | WEBVIEW_CLOSE_ALL_FAIL | Failed to close all open WebViews. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Example
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
void View_CouponPopup(Base::WebViewMode mode, OnPopupFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
mode | Base::WebViewMode | Y | Modes for running WebView |
onFinished | OnPopupFinished | Y | Callback function that receives the results of running WebView |
Returns
None
Callback
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Call 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success (WebView creation successful, or WebView closed normally) | x | |
| 5 | INVALID_PARAM | You are not currently connected to the World (game server). | x | |
| 17 | NOT_INITIALIZED | The BaseSDK has not been initialized. | x | |
| 33 | POPUP_NOT_CREATED | The app terminated without creating any WebViews. It is passed to the onDestroy callback only once, but is not passed to the onFinished callback. | x | |
| 80 | VIEWUI_NOT_INITIALIZED | The internal WebView UI for displaying pop-ups has not been initialized. | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to create a WebView (including cases where only some pop-ups failed to create). | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | The WebView was unable to load the URL. | x | |
| 84 | WEBVIEW_CLOSE_ALL_FAIL | Before displaying a new pop-up, the system failed to close all previously open web views. | x | |
| 85 | WEBVIEW_CLOSE_FAIL | Failed to close the WebView at onDestroy. | x | |
| 87 | NO_POPUP_DATA | There is no pop-up data to display. | O | There is no pop-up configuration information, so there is no window to display. [OK] |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary problem has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For a complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
onFinished's callbackResult | SDK | It is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately. |
Example
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
- To receive the event when the pop-up closes, you must use View_CouponPopupEx.
- To close all pop-ups displayed on the screen at once, use View_CloseAllPopups.
See Also
- View_CouponPopupEx
- View_AutoPopup
- View_ManualPopup
- View_NewsPopup
- View_CloseAllPopups
- SDKMethod
- SDKResultCode
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
void View_CouponPopupEx(Base::WebViewMode mode, OnPopupFinished onFinished, OnViewPopupDestroyFinished onDestroy);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
mode | Base::WebViewMode | Y | Modes for running WebView |
onFinished | OnPopupFinished | Y | Callback function that receives the results of running WebView |
onDestroy | OnViewPopupDestroyFinished | N | A callback function pointer that is called when the pop-up is closed |
Returns
None
Callback
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
typedef void(__cdecl* OnViewPopupDestroyFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Call 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success (WebView created successfully, or WebView closed normally) | x | |
| 5 | INVALID_PARAM | You are not currently connected to the world (game server). | x | |
| 17 | NOT_INITIALIZED | The BaseSDK has not been initialized. | x | |
| 33 | POPUP_NOT_CREATED | The app exited without creating any WebViews. It is passed to the onDestroy callback only once, but is not passed to the onFinished callback. | x | |
| 80 | VIEWUI_NOT_INITIALIZED | The internal WebView UI for displaying pop-ups has not been initialized. | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to create the WebView (including cases where only some pop-ups failed to create). | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | The WebView was unable to load the URL. | x | |
| 84 | WEBVIEW_CLOSE_ALL_FAIL | Before displaying a new pop-up, the system failed to close all previously open web views. | x | |
| 85 | WEBVIEW_CLOSE_FAIL | Failed to close the WebView at onDestroy. | x | |
| 87 | NO_POPUP_DATA | There is no pop-up data to display. | O | There is no pop-up configuration information, so there is no window to display. [OK] |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
onFinished/onDestroy's callbackResult | SDK | It is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately. |
Example
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
onFinishedandonDestroyare 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
void View_FetchWebOpenKey(OnFetchWebOpenKeyFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
onFinished | OnFetchWebOpenKeyFinished | Y | A callback function that receives the results of the FetchWebOpenKey execution |
Returns
None
Callback
typedef void(__cdecl* OnFetchWebOpenKeyFinished)(CallbackResult callbackResult, const wchar_t* key);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Call Results |
key | const 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 17 | NOT_INITIALIZED | The BaseSDK has not been initialized. | x | |
| 25 | RESPONSE_VALUE_IS_NULL | The value required for the server response is missing. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 26 | RESPONSE_INVALID_VALUE_FORMAT | The server response format (JSON parsing/field validation) is incorrect. | O | The network connection is unstable. Please check your network status and try again. [OK] |
| 249 | NETWORK_TRANSPORT_ERROR | An error occurred at the network transport layer. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
onFinished's callbackResult | SDK | It 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 key | SDK | Do 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
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
Result View_GetVersion(__out wchar_t* version, uint32_t length);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
version | wchar_t* (out) | Y | A buffer to receive version information. Allocated by the caller. |
length | uint32_t | Y | version Length of the array |
Returns
| Type | Description |
|---|---|
Result | Function call result. Check whether the call succeeded using result.IsSuccessful(). |
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 251 | PCSDK_DLL_NOT_FOUND | The executable file path could not be found. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
version | Caller | This is a buffer allocated by the caller. The SDK only fills the buffer; it does not own or deallocate it. |
Example
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
Result View_Initialize();
Parameters
None
Returns
| Type | Description |
|---|---|
Result | Function call result. Check result.IsSuccessful() to determine if the call was successful. |
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 16 | BASE_NOT_INITIALIZED | The BaseSDK has not been initialized. You must first call Base_Initialize (or Base_InitializeEx). | x | |
| 18 | ALREADY_INITIALIZED | Initialization of the pop-up feature was attempted again while already initialized. | x | |
| 80 | VIEWUI_NOT_INITIALIZED | Failed to initialize the internal WebView UI to display the pop-up. | x | |
| 251 | PCSDK_DLL_NOT_FOUND | The executable file path could not be found during the internal version check. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Example
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
Result View_InitializeWithWndInfo(const void* mainWndHandle);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
mainWndHandle | const void* (HWND) | Y | The handle of the main window that will serve as the parent window for the "Internal Style" pop-up |
Returns
| Type | Description |
|---|---|
Result | Function call result. Check whether the call succeeded using result.IsSuccessful(). |
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 16 | BASE_NOT_INITIALIZED | BaseSDK has not been initialized. You must first call Base_Initialize (or Base_InitializeEx). | x | |
| 18 | ALREADY_INITIALIZED | Initialization of the pop-up feature was attempted again while already initialized. | x | |
| 80 | VIEWUI_NOT_INITIALIZED | Failed to initialize the internal WebView UI to display the pop-up. | x | |
| 251 | PCSDK_DLL_NOT_FOUND | The executable file path could not be found during the internal version check. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | There was a temporary issue. Please try again. [OK] |
For the complete list, see SDKResultCode.
Example
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.
mainWndHandleis 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
void View_ManualPopup(const wchar_t* resourceKey, Base::WebViewMode mode, OnPopupFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
resourceKey | const wchar_t* | Y | ResourceKey for ManualPopup |
mode | Base::WebViewMode | Y | Modes for Running WebView |
onFinished | OnPopupFinished | Y | Callback function that receives the results of running WebView |
Returns
None
Callback
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Call 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success (WebView creation successful, or WebView closed normally) | x | |
| 5 | INVALID_PARAM | resourceKey is an empty string. | x | |
| 17 | NOT_INITIALIZED | The BaseSDK has not been initialized. | x | |
| 33 | POPUP_NOT_CREATED | The app terminated without creating any WebViews. The onDestroy callback is triggered only once, while the onFinished callback is not triggered at all. | x | |
| 80 | VIEWUI_NOT_INITIALIZED | The internal WebView UI for displaying pop-ups has not been initialized. | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to create the WebView (including cases where only some pop-ups failed to create). | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | The WebView was unable to load the URL. | x | |
| 84 | WEBVIEW_CLOSE_ALL_FAIL | Before displaying a new pop-up, the system failed to close all previously open web views. | x | |
| 85 | WEBVIEW_CLOSE_FAIL | Failed to close the WebView at onDestroy. | x | |
| 87 | NO_POPUP_DATA | There is no pop-up data to display. | O | There is no pop-up configuration information, so there is no window to display. [OK] |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
onFinished's callbackResult | SDK | It is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately. |
Example
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
| Version | Change |
|---|---|
| 3.0.0.4 | First Published |
| 3.3.4 | NO_POPUP_DATA(87) Add result code |
See Also
- View_ManualPopupEx
- View_AutoPopup
- View_NewsPopup
- View_CouponPopup
- View_CloseAllPopups
- SDKMethod
- SDKResultCode
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
void View_ManualPopupEx(const wchar_t* resourceKey, Base::WebViewMode mode,
OnPopupFinished onFinished, OnViewPopupDestroyFinished onDestroy);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
resourceKey | const wchar_t* | Y | ResourceKey for ManualPopup |
mode | Base::WebViewMode | Y | Modes for running WebView |
onFinished | OnPopupFinished | Y | Callback function that receives the results of running WebView |
onDestroy | OnViewPopupDestroyFinished | N | A callback function pointer that is called when the pop-up is closed |
Returns
None
Callback
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
typedef void(__cdecl* OnViewPopupDestroyFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Call 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success (WebView created successfully, or WebView closed normally) | x | |
| 5 | INVALID_PARAM | resourceKey is an empty string. | x | |
| 17 | NOT_INITIALIZED | The BaseSDK has not been initialized. | x | |
| 33 | POPUP_NOT_CREATED | The app terminated without creating any WebViews. The onDestroy callback is called only once, and the onFinished callback is not called. | x | |
| 80 | VIEWUI_NOT_INITIALIZED | The internal WebView UI for displaying pop-ups has not been initialized. | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to create the WebView (including cases where only some pop-ups failed to create). | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | The WebView was unable to load the URL. | x | |
| 84 | WEBVIEW_CLOSE_ALL_FAIL | Before displaying a new pop-up, the system failed to close all previously open web views. | x | |
| 85 | WEBVIEW_CLOSE_FAIL | Failed to close the WebView at onDestroy. | x | |
| 87 | NO_POPUP_DATA | There is no pop-up data to display. | O | There is no pop-up configuration information, so there is no window to display. [OK] |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | There was a temporary issue. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
onFinished/onDestroy's callbackResult | SDK | It is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately. |
Example
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
onFinishedandonDestroyare 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
void View_NewsPopup(Base::WebViewMode mode, OnPopupFinished onFinished);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
mode | Base::WebViewMode | Y | Modes for running WebView |
onFinished | OnPopupFinished | Y | Callback function that receives the results of running WebView |
Returns
None
Callback
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Call 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success (WebView created successfully, or WebView closed normally) | x | |
| 17 | NOT_INITIALIZED | The BaseSDK has not been initialized. | x | |
| 33 | POPUP_NOT_CREATED | The 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 | |
| 80 | VIEWUI_NOT_INITIALIZED | The internal WebView UI for displaying pop-ups has not been initialized. | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to create the WebView (including cases where only some pop-ups failed to create). | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | The WebView was unable to load the URL. | x | |
| 84 | WEBVIEW_CLOSE_ALL_FAIL | Before displaying a new pop-up, the system failed to close all previously open web views. | x | |
| 85 | WEBVIEW_CLOSE_FAIL | Failed to close the WebView at onDestroy. | x | |
| 87 | NO_POPUP_DATA | There is no pop-up data to display. | O | There is no pop-up configuration information, so there is no window to display. [OK] |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
onFinished's callbackResult | SDK | It is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately. |
Example
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
| Version | Change |
|---|---|
| 3.0.0.4 | First Published |
| 3.3.4 | NO_POPUP_DATA(87) Add result code |
See Also
- View_NewsPopupEx
- View_AutoPopup
- View_ManualPopup
- View_CouponPopup
- View_CloseAllPopups
- SDKMethod
- SDKResultCode
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
void View_NewsPopupEx(Base::WebViewMode mode, OnPopupFinished onFinished, OnViewPopupDestroyFinished onDestroy);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
mode | Base::WebViewMode | Y | Modes for Running WebView |
onFinished | OnPopupFinished | Y | Callback function that receives the results of running WebView |
onDestroy | OnViewPopupDestroyFinished | N | A callback function pointer that is called when the pop-up is closed |
Returns
None
Callback
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
typedef void(__cdecl* OnViewPopupDestroyFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Call 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success (WebView created successfully, or WebView closed normally) | x | |
| 17 | NOT_INITIALIZED | The BaseSDK has not been initialized. | x | |
| 33 | POPUP_NOT_CREATED | The app terminated without creating any WebViews. The onDestroy callback is called only once, and the onFinished callback is not called at all. | x | |
| 80 | VIEWUI_NOT_INITIALIZED | The internal WebView UI for displaying pop-ups has not been initialized. | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to create the WebView (including cases where only some pop-ups failed to create). | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | The WebView was unable to load the URL. | x | |
| 84 | WEBVIEW_CLOSE_ALL_FAIL | Before displaying a new pop-up, the system failed to close all previously open web views. | x | |
| 85 | WEBVIEW_CLOSE_FAIL | Failed to close the WebView at onDestroy. | x | |
| 87 | NO_POPUP_DATA | There is no pop-up data to display. | O | There is no pop-up configuration information, so there is no window to display. [OK] |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
onFinished/onDestroy's callbackResult | SDK | It is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it separately. |
Example
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
onFinishedandonDestroyare 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
void View_SetPopupDisallowed(const StovePCPopupDisallowed* disallowed, OnSetPopupDisallowedFinished onSetPopupDisallowed);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
disallowed | const StovePCPopupDisallowed* | Y | Information Required When Not Displaying Pop-ups |
onSetPopupDisallowed | OnSetPopupDisallowedFinished | N | Callback function that receives the results of the PopupDisallowed execution |
Returns
None
Callback
typedef void(__cdecl* OnSetPopupDisallowedFinished)(CallbackResult callbackResult);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Call 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success | x | |
| 1 | FAIL | Failed to save the configuration information to a local file. | x | |
| 17 | NOT_INITIALIZED | The BaseSDK has not been initialized. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
disallowed | Caller | Created 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 callbackResult | SDK | It is passed by value (value type) and is automatically destroyed when the callback function returns. There is no need to free it manually. |
Example
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.
disallowedis 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
Result View_UnInitialize();
Parameters
None
Returns
| Type | Description |
|---|---|
Result | Function call result. Check whether the call succeeded using result.IsSuccessful(). |
Error Codes
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success (including cases where the IAP still uses the shared WebView UI and therefore skips the actual unlock process) | x | |
| 17 | NOT_INITIALIZED | The pop-up feature was called before it had been initialized. | x | |
| 81 | VIEWUI_UNINIT_FAILED | Failed to close the internal WebView UI. | x | |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
For the complete list, see SDKResultCode.
Example
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
- This function is synchronous and does not accept callbacks.
- This is the terminating function that pairs with View_Initialize or View_InitializeWithWndInfo.
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
void View_VerifyIdentificationPopup(bool compareIdentifier, Base::WebViewMode mode,
OnPopupFinished onFinished, OnVerifyIdentificationPopupDestroyFinished onDestroy);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
compareIdentifier | bool | Y | Whether verification is performed using SDI. If false, simKey is provided as onDestroy. |
mode | Base::WebViewMode | Y | Modes for running WebView |
onFinished | OnPopupFinished | Y | Callback function that receives the results of running WebView |
onDestroy | OnVerifyIdentificationPopupDestroyFinished | N | A pointer to the callback function that is called when the VerifyIdentificationPopup popup is closed |
Returns
None
Callback
typedef void(__cdecl* OnPopupFinished)(CallbackResult callbackResult);
typedef void(__cdecl* OnVerifyIdentificationPopupDestroyFinished)(CallbackResult callbackResult, const wchar_t* simKey);
| Name | Type | Description |
|---|---|---|
callbackResult | CallbackResult | Call Results |
simKey | const 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
| Code | Name | Description | Show to User | In-Game Message |
|---|---|---|---|---|
| 0 | SUCCESS | Success (WebView created successfully, or WebView closed normally) | x | |
| 17 | NOT_INITIALIZED | The BaseSDK has not been initialized. | x | |
| 31 | NOT_SUPPORTED_COUNTRY | The logged-in user's GDS country is not South Korea (kr). This pop-up is for South Korea only. | x | |
| 33 | POPUP_NOT_CREATED | The 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 | |
| 80 | VIEWUI_NOT_INITIALIZED | The internal WebView UI for displaying pop-ups has not been initialized. | x | |
| 82 | WEBVIEW_CREATE_FAIL | Failed to create the WebView (including cases where only some pop-ups failed to create). | x | |
| 83 | WEBVIEW_LOAD_URL_FAIL | The WebView was unable to load the URL. | x | |
| 84 | WEBVIEW_CLOSE_ALL_FAIL | Before displaying the new pop-up, the system failed to close all previously open web views. | x | |
| 85 | WEBVIEW_CLOSE_FAIL | Failed to close the WebView at onDestroy. | x | |
| 87 | NO_POPUP_DATA | There is no pop-up data to display. | O | There is no pop-up configuration information, so there is no window to display. [OK] |
| 253 | UNMANAGED_EXCEPTION | An exception occurred during execution. | O | A temporary issue has occurred. Please try again. [OK] |
| 254 | MANAGED_EXCEPTION | An exception occurred during execution. | O | There was a temporary issue. Please try again. [OK] |
For the complete list, see SDKResultCode.
Memory Management
| Object | Owner | Release |
|---|---|---|
onFinished/onDestroy's callbackResult | SDK | It 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 simKey | SDK | Do 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
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
simKeyfield inonDestroyis populated with a valid value only whencompareIdentifierisfalse. - To close all pop-ups displayed on the screen at once, use View_CloseAllPopups.
Changelog
| Version | Change |
|---|---|
| 3.3.4 | First Published |
| 3.4.1 | Restricted 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
namespace Stove
{
namespace PCSDK
{
namespace Base
{
enum class WebViewMode : uint32_t
{
EXTERNAL = 0,
INTERNAL,
_MAX_COUNT
};
}
}
}
Enum Values
| Code | Name | Description |
|---|---|---|
| 0 | EXTERNAL | WebView runs in External Mode. |
| 1 | INTERNAL | WebView runs in Internal Mode. |
| 2 | _MAX_COUNT | Not used. This value indicates the end of WebViewMode and is not a valid value. |
Example
using namespace Stove::PCSDK::Base;
using namespace Stove::PCSDK::IAP;
StovePCPurchaseOption option;
option.SetWebviewMode(WebViewMode::EXTERNAL);
Notes
Stove::PCSDK::BaseAlthough it is declared in the namespace, it is not part of the SDK's own API; rather, it is used asWebviewModein the payment functionality structure and asBase::WebViewModein the pop-up-related APIs._MAX_COUNTis a sentinel value indicating the number of values and must not be passed to the API.