In order for your module to be used within WinGate it needs to export a set of mandatory functions.
extern "C" __declspec(dllexport) int InitialiseGUI(HostAPI* pHost, HostModuleHandle hModule) |
Pointer to the UI host API. This is the root interface used to interface to WinGate Management Console. |
An opaque handle that references this instance of your module within the framework. It is passed as a parameter to RegisterComponent. |
extern "C" __declspec(dllexport) int Initialise(HostAPI* pHost, HostModuleHandle hModule, LPCWSTR szRegistryPath) |
See Initialise
extern "C" __declspec(dllexport) int ModuleGetAPIVersion() |
ModuleGetAPIVersion should return the version of the API that your module was compiled with. WinGate will check that the version returned from ModuleGetAPIVersion is the same as its own internal version. If they differ, the module will not be loaded.
Typically the function looks like so:
extern "C" __declspec(dllexport) int ModuleGetAPIVersion() { return COMPONENTS_API_VERSION; } |