mirror of https://github.com/OpenVPN/openvpn-gui
openvpn.c: add missing calling convention
Commit 131c75e5
("Notify dialog windows when OpenVPN state changes") added callback
function, but forgot to specify __stdcall calling convention with CALLBACK keyword.
This is not an issue for x64 builds, but x86 requires __stdcall calling convention for callbacks,
otherwise compiler throws an error:
Error: D:\a\openvpn-gui\openvpn-gui\openvpn.c(292): error C2440: 'function': cannot convert from 'BOOL (__cdecl *)(HWND,LPARAM)' to 'WNDENUMPROC'
Reported-by: Samuli Seppänen <samuli@openvpn.net>
Signed-off-by: Lev Stipakov <lev@openvpn.net>
pull/444/head
parent
014dc1a6c2
commit
290906b8db
|
@ -255,7 +255,7 @@ parse_assigned_ip(connection_t *c, const char *msg)
|
|||
* OpenVPN daemon (e., "CONNECTED")
|
||||
* The function signature matches callback for EnumThreadWindows.
|
||||
*/
|
||||
BOOL
|
||||
BOOL CALLBACK
|
||||
NotifyStateChange(HWND hwnd, LPARAM lParam)
|
||||
{
|
||||
SendMessage(hwnd, WM_OVPN_STATE, 0, lParam);
|
||||
|
|
Loading…
Reference in New Issue