Partager via


CLUSCTL_RESOURCE_STORAGE_IS_PATH_VALID control code

Verifies that a specified path exists on a storage class resource. Applications use this control code as a parameter to the ClusterResourceControl function, and resource DLLs receive the control code as a parameter to the ResourceControl function.

ClusterResourceControl( hResource,                              // resource handle
                        hHostNode,                              // optional host node
                        CLUSCTL_RESOURCE_STORAGE_IS_PATH_VALID, // this control code
                        lpInBuffer                              // input buffer
                        cbInBufferSize,                         // input buffer size (bytes)
                        NULL,                                   // output buffer (not used)
                        0,                                      // output buffer size (not used)
                        NULL );                                 // actual size of result (not used)

Parameters

The following control code function and DLL support parameters are specific to this control code. For complete parameter descriptions, see ClusterResourceControl or ResourceControl.

lpInBuffer

Pointer to a null-terminated Unicode string specifying the path to validate.

Return value

ClusterResourceControl returns one of the following values:

ERROR_SUCCESS

0

The specified path is valid for the storage class resource identified by hResource.

ERROR_FILE_NOT_FOUND

2

The specified path is not valid and refers to an offline storage class resource different from the storage class resource identified by the hResource parameter.

ERROR_PATH_NOT_FOUND

3

The specified path does not exist on the storage class resource identified by hResource.

ERROR_BAD_PATHNAME

161 (0xA1)

The specified path is not valid and cannot exist on the storage class resource identified by hResource.

System error code

The operation failed.

Implementations of ResourceControl can return one of the previous values or the following value.

ERROR_INVALID_FUNCTION

1

Requests that the Resource Monitor perform default processing (if any) for the control code addition to processing supplied by the DLL (if any).

Remarks

Do not use the CLUSCTL_RESOURCE_STORAGE_IS_PATH_VALID control code in any resource DLL entry point function. This control code can safely be called from a worker thread. For more information, see Function Calls to Avoid in Resource DLLs.

ClusAPI.h defines the 32 bits of CLUSCTL_RESOURCE_STORAGE_IS_PATH_VALID as follows (for more information, see Control Code Architecture).

Component Bit location Value
Object code
24 31
CLUS_OBJECT_RESOURCE (0x1)
Global bit
23
CLUS_NOT_GLOBAL (0x0)
Modify bit
22
CLUS_NO_MODIFY (0x0)
User bit
21
CLCTL_CLUSTER_BASE (0x0)
Type bit
20
External (0x0)
Operation code
0 23
CLCTL_STORAGE_IS_PATH_VALID (0x199)
Access code
0 1
CLUS_ACCESS_READ (0x1)

Resource DLL Support

Conditional. If your resource DLL handles storage class resources, you must support the CLUSCTL_RESOURCE_STORAGE_IS_PATH_VALID control code. Keep in mind that this control code is a "yes-or-no" question, so try to return only ERROR_SUCCESS, ERROR_PATH_NOT_FOUND, ERROR_BAD_PATHNAME, or other values that unambiguously indicate whether the path is valid.

The Resource Monitor does not provide default handling.

For more information on the ResourceControl entry point, see Implementing ResourceControl.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008 Enterprise, Windows Server 2008 Datacenter
Header
ClusAPI.h

See also

ClusterResourceControl

ResourceControl