ClfsMgmtInstallPolicy function (wdm.h)
The ClfsMgmtInstallPolicy routine adds a CLFS_MGMT_POLICY structure to a physical log.
Syntax
CLFSUSER_API NTSTATUS ClfsMgmtInstallPolicy(
[in] PLOG_FILE_OBJECT LogFile,
[in] PCLFS_MGMT_POLICY Policy,
[in] ULONG PolicyLength
);
Parameters
[in] LogFile
A pointer to a LOG_FILE_OBJECT structure that represents the CLFS log that this instance of the CLFS_MGMT_POLICY structure will apply to. The policy applies to all streams within the log, even if a single stream within the log was specified.
[in] Policy
A pointer to a CLFS_MGMT_POLICY structure that contains the policy to be installed.
[in] PolicyLength
The length, in bytes, of the structure pointed to by the Policy parameter.
Return value
The ClfsMgmtInstallPolicy routine returns one of the following NTSTATUS values:
Return code | Description |
---|---|
|
The policy has been installed. |
|
A NULL value was supplied for the LogFile parameter. |
|
A NULL value was supplied for the Policy parameter. |
|
The value of the PolicyLength parameter is less than the size of an instance of the CLFS_MGMT_POLICY structure. |
|
The PolicyFlags member of the CLFS_MGMT_POLICY_STRUCTURE pointed to by the Policy parameter specifies any flag other than LOG_POLICY_OVERWRITE. |
|
One of the following conditions is true:
|
|
The log already has a policy of this type, and the LOG_POLICY_OVERWRITE flag is not set. |
|
There is insufficient memory to complete the operation. |
This routine might also return other NTSTATUS Values.
Remarks
Policies are volatile. When all handles to the log are closed, the policies will be lost. You should install policies each time you register the first client.
You should only register a CLFS_MGMT_POLICY structure whose PolicyType member is equal to ClfsMgmtPolicyNewContainerSize before the first container in the log is created. Any subsequent registrations are ignored.
The log policy that is installed applies to the physical log, even if the LogFile parameter specifies a log stream.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available in Windows Server 2003 R2, Windows Vista, and later versions of Windows. |
Target Platform | Desktop |
Header | wdm.h (include Wdm.h, Ntddk.h, Ntifs.h) |
Library | Clfs.lib |
DLL | Clfs.sys |
IRQL | <= APC_LEVEL |