diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-03 12:31:49 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-03 12:31:49 +0100 |
commit | 2af7fbd64aeea5c178c94054270e716be0b2a344 (patch) | |
tree | edcaefd722abf1f9640c577a7c82503ef87418ed /api | |
parent | api: add pool/driver removal for uninstaller semantics (diff) | |
download | wintun-2af7fbd64aeea5c178c94054270e716be0b2a344.tar.xz wintun-2af7fbd64aeea5c178c94054270e716be0b2a344.zip |
api: use 'open' name since caller must close handle
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'api')
-rw-r--r-- | api/adapter.c | 2 | ||||
-rw-r--r-- | api/adapter.h | 4 | ||||
-rw-r--r-- | api/exports.def | 2 | ||||
-rw-r--r-- | api/session.c | 2 | ||||
-rw-r--r-- | api/wintun.h | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/api/adapter.c b/api/adapter.c index 8cd244d..3db3174 100644 --- a/api/adapter.c +++ b/api/adapter.c @@ -781,7 +781,7 @@ WintunGetAdapterLUID(_In_ const WINTUN_ADAPTER *Adapter, _Out_ NET_LUID *Luid) } WINTUN_STATUS WINAPI -WintunGetAdapterDeviceObject(_In_ const WINTUN_ADAPTER *Adapter, _Out_ HANDLE *Handle) +WintunOpenAdapterDeviceObject(_In_ const WINTUN_ADAPTER *Adapter, _Out_ HANDLE *Handle) { return GetDeviceObject(Adapter->DevInstanceID, Handle); } diff --git a/api/adapter.h b/api/adapter.h index cb64af7..40c087a 100644 --- a/api/adapter.h +++ b/api/adapter.h @@ -35,10 +35,10 @@ void WINAPI WintunFreeAdapter(_In_ WINTUN_ADAPTER *Adapter); /** - * @copydoc WINTUN_GET_ADAPTER_DEVICE_OBJECT_FUNC + * @copydoc WINTUN_OPEN_ADAPTER_DEVICE_OBJECT_FUNC */ WINTUN_STATUS WINAPI -WintunGetAdapterDeviceObject(_In_ const WINTUN_ADAPTER *Adapter, _Out_ HANDLE *Handle); +WintunOpenAdapterDeviceObject(_In_ const WINTUN_ADAPTER *Adapter, _Out_ HANDLE *Handle); /** * @copydoc WINTUN_CREATE_ADAPTER_FUNC diff --git a/api/exports.def b/api/exports.def index dd7f9bb..10c82c2 100644 --- a/api/exports.def +++ b/api/exports.def @@ -8,7 +8,7 @@ EXPORTS WintunEnumAdapters WintunFreeAdapter WintunGetAdapter - WintunGetAdapterDeviceObject + WintunOpenAdapterDeviceObject WintunGetAdapterGUID WintunGetAdapterLUID WintunGetAdapterName diff --git a/api/session.c b/api/session.c index ddfa61d..ebb8d59 100644 --- a/api/session.c +++ b/api/session.c @@ -110,7 +110,7 @@ WintunStartSession( goto cleanupSendTailMoved; } - Result = WintunGetAdapterDeviceObject(Adapter, &s->Handle); + Result = WintunOpenAdapterDeviceObject(Adapter, &s->Handle); if (Result != ERROR_SUCCESS) { LOG(WINTUN_LOG_ERR, L"Failed to open adapter device object"); diff --git a/api/wintun.h b/api/wintun.h index 8725b00..353c1e9 100644 --- a/api/wintun.h +++ b/api/wintun.h @@ -147,7 +147,7 @@ typedef WINTUN_STATUS(WINAPI *WINTUN_GET_ADAPTER_FUNC)( * @return ERROR_SUCCESS on success; Win32 error code otherwise. */ typedef WINTUN_STATUS( - WINAPI *WINTUN_GET_ADAPTER_DEVICE_OBJECT_FUNC)(_In_ WINTUN_ADAPTER_HANDLE Adapter, _Out_ HANDLE *Handle); + WINAPI *WINTUN_OPEN_ADAPTER_DEVICE_OBJECT_FUNC)(_In_ WINTUN_ADAPTER_HANDLE Adapter, _Out_ HANDLE *Handle); /** * Returns the GUID of the adapter. |