]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Simplify iphlpapi.dll API calls
authorSimon Rozman <simon@rozman.si>
Thu, 12 Oct 2017 08:07:20 +0000 (10:07 +0200)
committerGert Doering <gert@greenie.muc.de>
Sat, 14 Oct 2017 20:56:22 +0000 (22:56 +0200)
commita5d73667ffebea93960c135322aa3a8d0fd70d7a
tree3ad93bab27454f90bf41aac92006d2580f360e47
parent55305a2fc66a768cbbf152da9092400590504574
Simplify iphlpapi.dll API calls

Dynamically locating API function addresses at run-time using
GetProcAddress() was a leftover from the early days of the interactive
service development. It was required before `NTDDI_VERSION` was raised
from Windows XP to Windows Vista.

After NTDDI_VERSION API level was raised to NTDDI_VISTA, the direct
calling of Vista introduced API functions is possible and much
simpler.

This patch simplifies the code while in the same time it removes
controversial function type definitions that caused interactive service
not to compile on MSVC.
Acked-by: Selva Nair <selva.nair@gmail.com>
Message-Id: <20171012080720.7764-1-simon@rozman.si>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15614.html

Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpnserv/interactive.c