IFsrmQuotaBase::CreateThresholdAction method

[This method is supported for compatibility but it's recommended to use the FSRM WMI Classes to manage FSRM. Please see the MSFT_FSRMQuota class.]

Creates an action and associates it with the specified threshold.

Syntax


HRESULT CreateThresholdAction(
  [in]   FSRM_QUOTA_THRESHOLD threshold,
  [in]   FsrmActionType actionType,
  [out]  IFsrmAction **action
);

Parameters

threshold [in]

The threshold with which to associate the action. Specify the same value that you specified when calling the IFsrmQuotaBase::AddThreshold method.

actionType [in]

The action to perform when the threshold is reached or exceeded. For possible values, see the FsrmActionType enumeration.

action [out]

An IFsrmAction interface of the newly created action. Query the interface for the action interface that you specified in the actionType parameter. For example, if the action type is FsrmActionType_Command, query the interface for the IFsrmActionCommand interface.

Return value

The method returns the following return values.

Return codeDescription
S_OK

Success

FSRM_E_OUT_OF_RANGE

The threshold value is out of range.

FSRM_E_ALREADY_EXISTS

An action of the specified type already exists for the threshold.

FSRM_E_NOT_FOUND

The specified threshold was not found.

E_INVALIDARG

The action parameter is NULL or the actiontype parameter is not valid.

 

Remarks

You can specify up to four unique actions for each threshold.

The action is deleted if the threshold is deleted.

Examples

For an example, see Using Templates to Define Quotas.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008

Header

FsrmQuota.h

DLL

SrmSvc.dll

IID

IID_IFsrmQuotaBase is defined as 1568a795-3924-4118-b74b-68d8f0fa5daf

See also

IFsrmQuotaBase
MSFT_FSRMQuota

 

 

Show:
© 2014 Microsoft