2020-10-13 19:42:30 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0
|
|
|
|
*
|
2021-01-30 16:45:26 +01:00
|
|
|
* Copyright (C) 2018-2021 WireGuard LLC. All Rights Reserved.
|
2020-10-13 19:42:30 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-10-17 15:11:34 +02:00
|
|
|
#include "wintun.h"
|
2020-10-13 19:42:30 +02:00
|
|
|
#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.
|
|
|
|
*
|
|
|
|
* Size Pointer to a variable to receive resource size.
|
|
|
|
*
|
2020-11-03 12:29:34 +01:00
|
|
|
* @return Resource address on success. If the function fails, the return value is NULL. To get extended error
|
|
|
|
* information, call GetLastError.
|
2020-10-15 12:52:01 +02:00
|
|
|
*/
|
2020-11-03 12:29:34 +01:00
|
|
|
_Return_type_success_(return != NULL) _Ret_bytecount_(*Size) const
|
|
|
|
void *ResourceGetAddress(_In_z_ const WCHAR *ResourceName, _Out_ DWORD *Size);
|
2020-10-14 08:29:01 +02:00
|
|
|
|
2020-10-15 12:52:01 +02:00
|
|
|
/**
|
|
|
|
* Copies resource to a file.
|
|
|
|
*
|
|
|
|
* DestinationPath File path
|
|
|
|
*
|
|
|
|
* ResourceName Name of the RT_RCDATA resource. Use MAKEINTRESOURCEW to locate resource by ID.
|
|
|
|
*
|
2020-11-03 12:29:34 +01:00
|
|
|
* @return If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To
|
|
|
|
* get extended error information, call GetLastError.
|
2020-10-15 12:52:01 +02:00
|
|
|
*/
|
2020-11-03 12:29:34 +01:00
|
|
|
_Return_type_success_(return != FALSE) BOOL
|
|
|
|
ResourceCopyToFile(_In_z_ const WCHAR *DestinationPath, _In_z_ const WCHAR *ResourceName);
|