C++ DLL integration

A DLL uses the same Ghotz C++ SDK as an EXE. Difference: when you call init() and how you keep the session alive inside the injected module.

← EXE guide · Full tutorial

1. Same files as EXE

Copy auth.hpp, skStr.h, and dependencies into your DLL project. Set API URL:

std::string url = skCrypt("https://keyghotz.space/api/1.2/").decrypt();
api GhotzApp(name, ownerid, version, url, path);

2. When to call init()

2. Auth flow inside DLL

  1. GhotzApp.init() — check GhotzApp.response.success.
  2. User enters credentials in your UI overlay.
  3. Call regstr, login, or license.
  4. Only enable cheats/features if response.success.

3. Example pattern (menu)

static bool g_auth_ok = false;

void OnLoginClick(const char* user, const char* pass) {
    if (!g_auth_ok) {
        GhotzApp.init();
        if (!GhotzApp.response.success) {
            ShowError(GhotzApp.response.message);
            return;
        }
    }
    GhotzApp.login(user, pass);
    g_auth_ok = GhotzApp.response.success;
    if (g_auth_ok) EnableFeatures();
}

4. HWID

Let the SDK send HWID automatically. Enable HWID lock in dashboard when ready for production.

5. Common mistakes

EXE guide → · C# →