wintun/api/nci.h
Jason A. Donenfeld 724508d61f api: make nci.lib work on x86
This is an appalling hack. We need the lib tool to generate a coff lib
with the "undecorate" parameter. And apparently the only way to do this
with the MSVC tools is by making a stub object, and then rewriting the
symbols using the def file. See Q131313 for Microsoft-sanctioned
details.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-11-02 11:38:02 +01:00

27 lines
629 B
C

/* SPDX-License-Identifier: GPL-2.0
*
* Copyright (C) 2018-2020 WireGuard LLC. All Rights Reserved.
*/
#pragma once
#include <Windows.h>
#ifdef GENERATE_LIB
# define DECLSPEC __declspec(dllexport)
# define STUB { return 0; }
#else
# define DECLSPEC __declspec(dllimport)
# define STUB ;
#endif
EXTERN_C DECLSPEC DWORD WINAPI
NciSetConnectionName(_In_ const GUID *Guid, _In_z_ const WCHAR *NewName) STUB
EXTERN_C DECLSPEC DWORD WINAPI
NciGetConnectionName(
_In_ const GUID *Guid,
_Out_z_bytecap_(InDestNameBytes) WCHAR *Name,
_In_ DWORD InDestNameBytes,
_Out_opt_ DWORD *OutDestNameBytes) STUB