21 lines
688 B
C
21 lines
688 B
C
#pragma once
|
|
|
|
#include <windows.h>
|
|
|
|
bool OpenDriver();
|
|
void CloseDriver();
|
|
bool EnsureDriverLoaded();
|
|
bool EscalateViaDriver(HANDLE* outSystemToken);
|
|
bool TerminateProcessViaDriver(DWORD pid);
|
|
|
|
// Writes the driver image packed into this executable to destPath, overwriting
|
|
// whatever is there. Returns false when no image is embedded or writing fails.
|
|
bool WriteEmbeddedDriverTo(const wchar_t* destPath);
|
|
|
|
// Size of the packed driver image in bytes, 0 when none is embedded.
|
|
DWORD EmbeddedDriverSize();
|
|
|
|
// Extracts the embedded ardrv.sys to destPath when the file is absent.
|
|
// Returns true when destPath exists afterwards.
|
|
bool ExtractDriverImageIfEmbedded(const wchar_t* destPath);
|