KsLoadResource function (ks.h)

Copies (loads) a resource from the given image.

Syntax

KSDDKAPI NTSTATUS KsLoadResource(
  [in]            PVOID     ImageBase,
  [in]            POOL_TYPE PoolType,
  [in]            ULONG_PTR ResourceName,
  [in]            ULONG     ResourceType,
  [out]           PVOID     *Resource,
  [out, optional] PULONG    ResourceSize
);

Parameters

[in] ImageBase

Pointer to the image base

[in] PoolType

Pool type to use when copying resource

[in] ResourceName

Resource name.

[in] ResourceType

Resource type

[out] Resource

Pointer to resultant resource memory.

[out, optional] ResourceSize

Pointer to ULONG value to receive the size of the resource.

Return value

STATUS_SUCCESS if successful, STATUS_INSUFFICIENT_RESOURCES if memory cannot be allocated, otherwise an appropriate error code.

Requirements

Requirement Value
Target Platform Universal
Header ks.h (include Ks.h)
Library Ks.lib