2020-10-13 19:42:30 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0
|
|
|
|
*
|
|
|
|
* Copyright (C) 2018-2020 WireGuard LLC. All Rights Reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "api.h"
|
|
|
|
#include <Windows.h>
|
|
|
|
|
2020-10-15 12:52:01 +02:00
|
|
|
/**
|
|
|
|
* Locates RT_RCDATA resource memory address and size.
|
|
|
|
*
|
|
|
|
* ResourceName Name of the RT_RCDATA resource. Use MAKEINTRESOURCEW to locate resource by ID.
|
|
|
|
*
|
|
|
|
* Address Pointer to a pointer variable to receive resource address.
|
|
|
|
*
|
|
|
|
* Size Pointer to a variable to receive resource size.
|
|
|
|
*
|
|
|
|
* @return ERROR_SUCCESS on success; Win32 error code otherwise.
|
|
|
|
*/
|
2020-10-13 19:42:30 +02:00
|
|
|
WINTUN_STATUS
|
2020-10-14 08:29:01 +02:00
|
|
|
ResourceGetAddress(_In_z_ const WCHAR *ResourceName, _Out_ const VOID **Address, _Out_ DWORD *Size);
|
|
|
|
|
2020-10-15 12:52:01 +02:00
|
|
|
/**
|
|
|
|
* Copies resource to a file.
|
|
|
|
*
|
|
|
|
* DestinationPath File path
|
|
|
|
*
|
|
|
|
* SecurityAttributes File security attributes. May be NULL for detault.
|
|
|
|
*
|
|
|
|
* ResourceName Name of the RT_RCDATA resource. Use MAKEINTRESOURCEW to locate resource by ID.
|
|
|
|
*
|
|
|
|
* @return ERROR_SUCCESS on success; Win32 error code otherwise.
|
|
|
|
*/
|
2020-10-14 08:29:01 +02:00
|
|
|
WINTUN_STATUS
|
|
|
|
ResourceCopyToFile(
|
2020-10-13 19:42:30 +02:00
|
|
|
_In_z_ const WCHAR *DestinationPath,
|
|
|
|
_In_opt_ SECURITY_ATTRIBUTES *SecurityAttributes,
|
|
|
|
_In_z_ const WCHAR *ResourceName);
|