Windows

CastarSdk for Windows

Overview

2024-11-04

CastarSdk SDK will helps you make money with Windows apps. You only need to integrate once and reap the benefits easily. It provides an integration package to support Windows applications developed using .NET(C#)/C++/C or other Windows development languages. After 48 hours, you'll see revenue data in your dashboard. This document has a complete integrated solution and takes approximately 45 minutes to complete.

Integration options

Supports:

Windows7-Windows11,

32 bits or 64 bits

Step 1:Apply for ClientId

Go applications-> Add -> create your ClientId for Windows.

Step 2:Download

Click to download now. SDK for Windows

windows.zip -> Unzipped files:

  • client_64.dll

  • client_64.h

  • client_386.dll

  • client_386.h

Step 3: SDK install

(1) SDK Startup Interface Description

The SDK no longer uses a single StartSDK(char*) interface to complete initialization and startup. Instead, it adopts a step-by-step initialization model.

Before starting the SDK, you must call the following interfaces to set parameters:

  • SetDevKey: Sets the developer's unique identification key (Developer Key).

  • SetDevSn: Sets the device serial number (Device Serial Number).

After setting the above parameters, start the SDK by calling the Start interface. The Start interface will block execution persistently while the SDK is running normally. Therefore, it must be called within an independent thread to avoid blocking the main business thread.

(2) SDK Stop Interface Description

Stop is the interface function used to shut down the SDK and does not accept any parameters.

When the program needs to end the SDK's operation, or the process is about to exit, the Stop interface should be explicitly called to notify the SDK's internal logic to safely exit its operational state.

It is recommended to call Stop in the following scenarios:

  • Before the program exits normally.

  • When the SDK needs to be forcibly terminated during exception handling.

(3) DLL Loading Description

The SDK is provided as a Windows Dynamic Link Library (DLL). The caller needs to load the corresponding DLL file at program runtime.

  • The DLL file path can be specified arbitrarily.

  • Supports loading using absolute or relative paths.

In the C++ example, the DLL is loaded dynamically via LoadLibrary, and function pointers are obtained via GetProcAddress.

(4) DLL File Naming Rule Description

There are naming differences in the DLL files provided by the SDK across different versions. Please note the following rules:

  • The DLL names that appear in older version examples, such as CastarSdkWin_*.*, can be renamed by yourself.

  • The core DLLs generated by the current Go SDK (e.g., CastarSdk_*.dll or client.dll) must not have their names modified arbitrarily.

    • These DLLs are strongly associated with the internal Go Runtime and exported symbols.

    • Modifying the file name may cause loading failures or runtime exceptions.

It is recommended to keep the original DLL filenames provided by the SDK unchanged.

Important Notes:

  1. The suffixes 64 and 386 correspond to 64-bit and 32-bit compilation environments respectively. Please load the appropriate DLL based on your program's compilation environment.

2. The start function blocks execution. Please execute it in a child thread; otherwise, it will block the main thread.

Other questions

How to check the docking status after the docking is completed?

You can check the docking status of the SDK in the Dashboard - Applicatiopns menu. After the SDK is integrated and initialized successfully, you can check the activation status on the Dashboard. There is a 10-15 minute delay in the first activation status. Please wait patiently for the status update.

After the docking is completed, there is no data on the dashboard after the hang-up test?

Our Dashboard data refresh time is 0:00 every day to settle the previous day's earnings. After you generate data today, please query the test data the next day. We will settle your previous day's earnings the next day.

Contact us

If you have other questions, you can consult through the Livechat customer service window on the right side of the dial and official website, or you can contact our customer service staff through the following channels

Official email : [email protected]

WhatsApphttps://wa.me/85254819836

Teamshttps://teams.live.com/l/invite/FEAwzeqFy_OCbYHsAE

Last updated