Runtime & Build
The Atlas.dll exports that pin the apphash and report the DLL version. Set before Atlas_Startup(); the apphash setters are one-shot per process.
SetAppHashPath
SetAppHashPathint Atlas_SetAppHashPath(const char* path);Override the file whose SHA-256 becomes the apphash. The path must be non-empty and at most 32767 chars; it isn't checked for existence until the file is read at server-call time.
Parameters
| Name | Type | Description |
|---|---|---|
path | const char* | Absolute path to the file whose hash should represent this binary. |
Returns
intATLAS_OK on success; ATLAS_ERR_BAD_ARG on an invalid path.SetAppHash
SetAppHashint Atlas_SetAppHash(const char* hex64);Set the apphash directly. Input MUST be lowercase-hex SHA-256: exactly 64 chars,
[0-9a-f] only. Empty / uppercase / any other input is rejected - no way to null the hash and bypass server whitelisting.Parameters
| Name | Type | Description |
|---|---|---|
hex64 | string | 64 lowercase hex chars - the SHA-256 of your shipped .exe. |
Returns
intATLAS_OK on success; ATLAS_ERR_BAD_ARG on any malformed input.GetResolvedAppHash
GetResolvedAppHashint Atlas_GetResolvedAppHash(char* out, size_t out_size);Read the apphash that WILL be sent on the next request. Callable pre or post
Startup. Size-query pattern: pass NULL, 0 first to learn the bytes needed, then allocate and re-call. Empty string if the source file couldn't be read.Parameters
| Name | Type | Description |
|---|---|---|
out | char* | Buffer. NULL on the size-query call. |
out_size | size_t | Buffer size. 0 on the size-query call. |
Returns
intBytes written on success (including NUL); -ATLAS_ERR_BUFFER_TOO_SMALL if the buffer is too small.Version
Versionint Atlas_Version(char* out, size_t out_size);Semver of the DLL surface. Use it to detect drift between your binding and the DLL you're loading.
Parameters
| Name | Type | Description |
|---|---|---|
out | char* | Buffer. NULL on the size-query call. |
out_size | size_t | Buffer size. |
Returns
intBytes written on success (including NUL); -ATLAS_ERR_BUFFER_TOO_SMALL otherwise.C++
// DLL surface version (semver).char buf[32];Atlas_Version(buf, sizeof(buf));// -> "1.0.3"Putting it together
The pin-the-apphash flow when you load the DLL directly:
C++
// Load Atlas.dll yourself, then pin the apphash BEFORE Atlas_Startup().// One-shot per process - locked after Startup. Post-init writes// return ATLAS_ERR_BAD_ARG.Atlas_SetApiKey("YOUR_API_KEY");Atlas_SetAppHashPath("C:\\Program Files\\MyApp\\myapp.exe");Atlas_SetAppHash(hex64); // 64 lowercase hex charsAtlas_Startup(); // Read what will be sent (empty if the source file couldn't be read):char buf[65];Atlas_GetResolvedAppHash(buf, sizeof(buf));One-shot per process applies to SetAppHash and SetAppHashPath - both lock after Startup(). Post-init writes return ATLAS_ERR_BAD_ARG. What the hash means for each binding is on Executable Hash Whitelist.
Was this page useful?
You have reached the end of this section.