POPEN_ROUTINE callback function (resapi.h)
Opens a resource. The POPEN_ROUTINE type defines a pointer to this function.
Syntax
POPEN_ROUTINE PopenRoutine;
RESID PopenRoutine(
[in] LPCWSTR ResourceName,
[in] HKEY ResourceKey,
[in] RESOURCE_HANDLE ResourceHandle
)
{...}
Parameters
[in] ResourceName
Name of the resource to open.
[in] ResourceKey
Cluster database key for the cluster that includes the resource represented by ResourceName.
[in] ResourceHandle
Handle to be passed to the SetResourceStatus callback function in the Startup entry-point function.
Return value
If the operation was successful, Open returns a resource identifier (RESID).
If the operation was not successful, Open returns NULL. Call SetLastError to specify that an error has occurred.
Remarks
The Open entry-point function opens a resource with the name identified by the ResourceName parameter and returns its resource identifier. The resource identifier can be used in future calls to other Resource API entry points to identify the resource.
Never close the handle represented by the ResourceHandle parameter or use it for any purpose other than passing it to the Resource Monitor through either the LogEvent callback function or the SetResourceStatus callback function.
For effective implementation strategies of the Open entry-point function, see Implementing Open.
Examples
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2008 Enterprise, Windows Server 2008 Datacenter |
Target Platform | Windows |
Header | resapi.h |