Getting Started
C/C++Quick start guide to integrate the DioProcess SDK into your C/C++ projects.
Prerequisites
- • Windows 10 or 11 (x64)
- • Visual Studio 2019+ with C++ desktop development workload
- • DioProcess driver loaded
- • Administrator privileges for your application
Step 1: Copy the Header
The SDK is a single header file. Copy DioProcessSDK.h to your project:
YourProject/
├── src/
│ └── main.cpp
└── include/
└── DioProcessSDK.hStep 2: Include the Header
#include "DioProcessSDK.h"
int main() {
// SDK is ready to use
return 0;
}The header includes all necessary Windows headers automatically.
Step 3: Connect to Driver
#include <iostream>
#include "DioProcessSDK.h"
int main() {
DioProcessSDK sdk;
// Open connection to driver
if (!sdk.Open()) {
std::cerr << "Failed to connect to driver" << std::endl;
std::cerr << "Error code: " << GetLastError() << std::endl;
return 1;
}
std::cout << "Connected to DioProcess driver!" << std::endl;
// Use SDK functions here...
// Clean up
sdk.Close();
return 0;
}Step 4: Build Your Project
Using Visual Studio Developer Command Prompt:
cl /EHsc /std:c++17 main.cpp /Fe:myapp.exeOr create a Visual Studio project with these settings:
- • Platform:
x64 - • C++ Language Standard:
ISO C++17 - • Add include directory with
DioProcessSDK.h
Step 5: Run as Administrator
Administrator Required
The SDK communicates with a kernel driver, which requires administrator privileges. Always run your application elevated.
To make your application always request elevation, add a manifest:
app.manifest
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>Basic Usage Pattern
#include "DioProcessSDK.h"
int main() {
DioProcessSDK sdk;
// 1. Open connection
if (!sdk.Open()) {
// Handle error - driver not loaded or not admin
return 1;
}
// 2. Use SDK functions
ULONG pid = GetCurrentProcessId();
// Protect current process
if (sdk.ProtectProcess(pid)) {
// Success
}
// Enable all privileges
if (sdk.EnableAllPrivileges(pid)) {
// Success
}
// Enumerate callbacks
BYTE buffer[8192];
DWORD bytesReturned;
if (sdk.EnumProcessCallbacks(buffer, sizeof(buffer), &bytesReturned)) {
ULONG count = *(ULONG*)buffer;
// Process results...
}
// 3. Close connection
sdk.Close();
return 0;
}Error Handling
All SDK functions return bool or BOOL. On failure, use GetLastError() for details:
if (!sdk.ProtectProcess(pid)) {
DWORD error = GetLastError();
switch (error) {
case ERROR_ACCESS_DENIED:
// Not running as admin
break;
case ERROR_FILE_NOT_FOUND:
// Driver not loaded
break;
default:
// Other error
break;
}
}Common Issues
Open() returns false:
- • Not running as Administrator
- • DioProcess driver not loaded (
sc query DioProcess) - • Driver file blocked by security software
Functions fail after Open() succeeds:
- • Invalid parameters (check buffer sizes)
- • Target process doesn't exist
- • Hypervisor functions require HV to be started first
Next Steps
- • See Examples for complete code samples
- • Check API Reference for all available functions