#include "precomp.h"
#include <ndk/ldrtypes.h>
#include <ndk/ldrfuncs.h>
#include "ntverrsrc.h"
#include <debug.h>
Go to the source code of this file.
|
NTSTATUS | NtGetVersionResource (IN PVOID BaseAddress, OUT PVOID *Resource, OUT PULONG ResourceSize OPTIONAL) |
|
static PCVS_VERSION_INFO_STRUCT32 | VersionInfo32_FindChild (IN PCVS_VERSION_INFO_STRUCT32 info, IN PCWSTR szKey, IN UINT cchKey) |
|
static NTSTATUS | VersionInfo32_QueryValue (IN PCVS_VERSION_INFO_STRUCT32 info, IN PCWSTR lpSubBlock, OUT PVOID *lplpBuffer, OUT PUINT puLen OPTIONAL, OUT BOOL *pbText OPTIONAL) |
|
NTSTATUS | NtVerQueryValue (IN const VOID *pBlock, IN PCWSTR lpSubBlock, OUT PVOID *lplpBuffer, OUT PUINT puLen) |
|
◆ DWORD_ALIGN
◆ NDEBUG
◆ VersionInfo32_Children
#define VersionInfo32_Children |
( |
|
ver | ) |
|
Value: ( ( (ver)->wValueLength * \
((ver)->wType? 2 : 1) + 3 ) & ~3 ) )
const VS_VERSION_INFO_STRUCT32 * PCVS_VERSION_INFO_STRUCT32
#define VersionInfo32_Value(ver)
Definition at line 95 of file ntverrsrc.c.
◆ VersionInfo32_Next
◆ VersionInfo32_Value
◆ VS_FILE_INFO
◆ VS_VERSION_INFO
◆ PCVS_VERSION_INFO_STRUCT32
◆ PVS_VERSION_INFO_STRUCT32
◆ VS_VERSION_INFO_STRUCT32
◆ NtGetVersionResource()
Definition at line 26 of file ntverrsrc.c.
32 #define VS_VERSION_INFO 1 // See psdk/verrsrc.h 33 #define VS_FILE_INFO RT_VERSION 42 ResourceInfo.
Type = 16;
52 DPRINT1(
"NtGetVersionResource: Version resource not found, Status 0x%08lx\n",
Status);
63 DPRINT1(
"NtGetVersionResource: Cannot access Version resource, Status 0x%08lx\n",
Status);
68 if (ResourceSize) *ResourceSize =
Size;
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG _In_opt_ PVOID Data
IN PVOID IN PVOID IN USHORT IN USHORT Size
_Acquires_exclusive_lock_ Resource _Acquires_shared_lock_ Resource _Inout_ PERESOURCE Resource
NTSTATUS NTAPI LdrFindResource_U(_In_ PVOID BaseAddress, _In_ PLDR_RESOURCE_INFO ResourceInfo, _In_ ULONG Level, _Out_ PIMAGE_RESOURCE_DATA_ENTRY *ResourceDataEntry)
NTSTATUS NTAPI LdrAccessResource(_In_ PVOID BaseAddress, _In_ PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry, _Out_opt_ PVOID *Resource, _Out_opt_ PULONG Size)
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
#define NT_SUCCESS(StatCode)
#define RESOURCE_DATA_LEVEL
Referenced by CheckForValidPEAndVendor().
◆ NtVerQueryValue()
Definition at line 174 of file ntverrsrc.c.
187 if (!lpSubBlock || !*lpSubBlock)
static NTSTATUS VersionInfo32_QueryValue(IN PCVS_VERSION_INFO_STRUCT32 info, IN PCWSTR lpSubBlock, OUT PVOID *lplpBuffer, OUT PUINT puLen OPTIONAL, OUT BOOL *pbText OPTIONAL)
Referenced by CheckForValidPEAndVendor().
◆ VersionInfo32_FindChild()
Definition at line 104 of file ntverrsrc.c.
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
#define VersionInfo32_Next(ver)
#define VersionInfo32_Children(ver)
Referenced by VersionInfo32_QueryValue().
◆ VersionInfo32_QueryValue()
Definition at line 124 of file ntverrsrc.c.
133 DPRINT(
"lpSubBlock : (%S)\n", lpSubBlock);
138 for (lpNextSlash = lpSubBlock; *lpNextSlash; lpNextSlash++)
140 if (*lpNextSlash ==
'\\')
145 if (lpNextSlash == lpSubBlock)
155 if (puLen) *puLen = 0;
160 lpSubBlock = lpNextSlash;
166 *puLen =
info->wValueLength;
168 *pbText =
info->wType;
static PCVS_VERSION_INFO_STRUCT32 VersionInfo32_FindChild(IN PCVS_VERSION_INFO_STRUCT32 info, IN PCWSTR szKey, IN UINT cchKey)
#define VersionInfo32_Value(ver)
#define STATUS_RESOURCE_TYPE_NOT_FOUND
Referenced by NtVerQueryValue().