We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6432784 commit 1a3f183Copy full SHA for 1a3f183
embeddable-dll-service/README.md
@@ -24,11 +24,12 @@ is absolutely essential; do not forget it.
24
##### 2. Have your program's main function handle the `/service` switch:
25
26
```c
27
-if (!wcscmp(wargv[1], L"/service") && wargc == 3) {
+if (wargc == 3 && !wcscmp(wargv[1], L"/service")) {
28
HMODULE tunnel_lib = LoadLibrary("tunnel.dll");
29
if (!tunnel_lib)
30
abort();
31
- tunnel_proc_t tunnel_proc = (tunnel_proc_t)GetProcAddress(tunnel_lib, "WireGuardTunnelService");
+ BOOL (_cdecl *tunnel_proc)(_In_ LPCWSTR conf_file);
32
+ *(FARPROC*)&tunnel_proc = GetProcAddress(tunnel_lib, "WireGuardTunnelService");
33
if (!tunnel_proc)
34
35
return tunnel_proc(wargv[2]);
0 commit comments