]> 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 21:02:33 +0000 (23:02 +0200)
commitc5f0ccf1376b6c7e1fe58c87a67b009be3ac9361
tree29c97f2933baeed72a465eb6fcf1031183550df3
parent0e91a2ddb79f34a8cb361cda2f4d4a1df39d3c18
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>
(cherry picked from commit a5d73667ffebea93960c135322aa3a8d0fd70d7a)
src/openvpnserv/interactive.c