Export (0) Print
Expand All

ResourceTypeControl callback function

Performs an operation that applies to a resource type. The PRESOURCE_TYPE_CONTROL_ROUTINE type defines a pointer to this function.

Syntax


DWORD WINAPI ResourceTypeControl(
  _In_   LPCWSTR ResourceTypeName,
  _In_   DWORD ControlCode,
  _In_   PVOID InBuffer,
  _In_   DWORD InBufferSize,
  _Out_  PVOID OutBuffer,
  _In_   DWORD OutBufferSize,
  _Out_  LPDWORD BytesReturned
);

typedef void (WINAPI *PRESOURCE_TYPE_CONTROL_ROUTINE)(
    _In_   LPCWSTR ResourceTypeName,
    _In_   DWORD ControlCode,
    _In_   PVOID InBuffer,
    _In_   DWORD InBufferSize,
    _Out_  PVOID OutBuffer,
    _In_   DWORD OutBufferSize,
    _Out_  LPDWORD BytesReturned
);

Parameters

ResourceTypeName [in]

Type of resource to be affected by the operation.

ControlCode [in]

Control code that represents the operation to be performed. For a list of valid values for the ControlCode parameter, see Resource Type Control Codes.

InBuffer [in]

Pointer to a buffer containing data to be used in the operation. InBuffer can be NULL if the operation does not require data.

InBufferSize [in]

Size, in bytes, of the buffer pointed to by InBuffer.

OutBuffer [out]

Pointer to a buffer containing data resulting from the operation. OutBuffer can be NULL if the operation returns no data.

OutBufferSize [in]

Size, in bytes, of the available space pointed to by OutBuffer.

BytesReturned [out]

Number of bytes in the buffer pointed to by OutBuffer that actually contain data.

Return value

If the operation succeeds, the function returns ERROR_SUCCESS.

If the operation fails, the function returns a system error code. The following is a possible error code.

Return codeDescription
ERROR_INVALID_FUNCTION

The resource DLL requested that the Resource Monitor perform default processing (if any) for ControlCode in addition to processing supplied by the DLL (if any).

 

Remarks

Some control codes should be handled by the resource DLL, while others should be left to the Resource Monitor. For effective implementation strategies of the ResourceTypeControl entry-point function, see Implementing ResourceTypeControl.

Examples

See Resource DLL Examples.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2003 Enterprise, Windows Server 2003 Datacenter

Header

ResApi.h

See also

Resource DLL Entry-Point Functions

 

 

Show:
© 2014 Microsoft