IFsrmClassificationManager::SetFileProperty method

Sets the value of the specified property in the file or folder.

Windows Server 2008 R2:  Only files are supported until Windows Server 2012.

Syntax


HRESULT SetFileProperty(
  [in]  BSTR filePath,
  [in]  BSTR propertyName,
  [in]  BSTR propertyValue
);

Parameters

filePath [in]

The file that contains the property that you want to set. You must specify an absolute path to the file. You cannot specify a file share.

propertyName [in]

The name of the property whose value you want to set.

propertyValue [in]

The value to set the specified property to.

Return value

The method returns the following return values.

Return codeDescription
S_OK

Success

E_INVALIDARG

The propertyValue parameter is not valid for the type of property definition specified.

FSRM_E_PATH_NOT_FOUND

The specified file is not found.

FSRM_E_INVALID_PATH

The specified path is invalid.

FSRM_E_SET_PROPERTY_FAILED

The specified property could not be removed. To get extended error information, call the GetErrorInfo function.

 

Remarks

The method verifies that the property value is valid for the property's type. For example, for an ordered or multiple choice list, that the value is a member of the list; for a Boolean property, that the value is the string "0" or "1"; and for a date, that the value is a 64-bit decimal value expressed as a string.

SetFileProperty only supports property definitions that are available on the server whose AppliesTo property has the FsrmPropertyDefinitionAppliesTo_Files (1) bit set.

Examples

For examples in C# and PowerShell see Accessing Classification Properties.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2008 R2

Header

FsrmPipeline.h (include FsrmPipeline.h or FsrmTlb.h)

DLL

SrmSvc.dll

CLSID

CLSID_FsrmClassificationManager is defined as b15c0e47-c391-45b9-95c8-eb596c853f3a

IID

IID_IFsrmClassificationManager is defined as d2dc89da-ee91-48a0-85d8-cc72a56f7d04

IID_IFsrmClassificationManager2 is defined as 0004c1c9-127e-4765-ba07-6a3147bca112

See also

IFsrmClassificationManager2
IFsrmClassificationManager
IFsrmClassificationManager::ClearFileProperty
IFsrmClassificationManager::EnumFileProperties
IFsrmClassificationManager::GetFileProperty
FsrmClassificationManager
MSFT_FSRMClassification

 

 

Show:
© 2015 Microsoft