PBEGIN_RESTYPECALL_ROUTINE callback function (resapi.h)

Starts a call to a resource control code. The PBEGIN_RESTYPECALL_ROUTINE type defines a pointer to this callback function.

Syntax

PBEGIN_RESTYPECALL_ROUTINE PbeginRestypecallRoutine;

DWORD PbeginRestypecallRoutine(
  [in]  LPCWSTR ResourceTypeName,
  [in]  DWORD ControlCode,
  [in]  PVOID InBuffer,
  [in]  DWORD InBufferSize,
  [out] PVOID OutBuffer,
  [in]  DWORD OutBufferSize,
  [out] LPDWORD BytesReturned,
  [in]  PRESTYPE_CTL_CTX context,
  [out] PBOOL ReturnedAsynchronously
)
{...}

Parameters

[in] ResourceTypeName

The name of the resource type.

[in] ControlCode

The control code to call.

[in] InBuffer

A pointer to the buffer that contains the input data for the call to the control code.

[in] InBufferSize

The size of the buffer specified by InBuffer, in bytes.

[out] OutBuffer

A pointer to the buffer that contains the output data for the call to the control code.

[in] OutBufferSize

The size of the buffer specified by OutBuffer, in bytes.

[out] BytesReturned

The size of the data returned by OutBuffer, in bytes.

[in] context

The context to the resource type control code that was called.

Windows Server 2012 R2:  This parameter was added in Windows Server 2016.

[out] ReturnedAsynchronously

TRUE if the operation returns asynchronously; otherwise, FALSE.

Windows Server 2012 R2:  This parameter was added in Windows Server 2016.

Return value

The function returns one of the following values, or a system error code:

Return code Description
ERROR_SUCCESS
The operation completed successfully.
ERROR_RESOURCE_NOT_FOUND
The resource ID was not found.
ERROR_INVALID_FUNCTION
The requested control code is not supported.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2012 R2
Target Platform Windows
Header resapi.h

See also

Resource DLL Entry-Point Functions

Resource Type Control Codes