1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-23 01:49:53 +03:00
SoftEtherVPN/src/vpndrvinst/Device.h
Davide Beatrici 9d29d8813b New vpndrvinst implementation, independent from Cedar and Mayaqua
This greatly improves performance and reduces the binary's size (~0.2 MB vs ~5 MB).

All recent Windows versions are supported, starting with Vista.

No dialogs are created, aside from error/warning ones in case of failure.

The only dependency (aside from Windows libraries) is libhamcore.
2021-03-12 05:46:20 +01:00

31 lines
823 B
C

#ifndef DEVICE_H
#define DEVICE_H
#include <stdbool.h>
#include <stddef.h>
typedef void *PVOID;
typedef PVOID HDEVINFO;
typedef struct HKEY__ *HKEY;
typedef struct _SP_DEVINFO_DATA SP_DEVINFO_DATA;
HDEVINFO GetDeviceInfo(SP_DEVINFO_DATA *devinfo_data, const char *instance);
void FreeDeviceInfo(HDEVINFO info);
bool ToggleDevice(const char *instance, const bool enable);
bool InstallDevice(const char *instance);
bool InstallDeviceWithMac(const char *instance, const char *mac);
bool UninstallDevice(const char *instance);
bool UpgradeDevice(const char *instance);
bool GetDeviceMac(const char *instance, char *dst, const size_t size);
bool SetDeviceMac(const char *instance, const char *src);
bool SetDeviceNetConfig(const char *instance);
HKEY GetDeviceRegKey(const char *instance, const bool writable);
#endif