3.2.4.2.45.13 CreatePropertyDefinition (Opnum 19)

The CreatePropertyDefinition method creates a blank Non-Persisted Property Definition Instance (section 3.2.1.6.1.2) and returns S_OK upon successful completion.

 [id(FSRM_DISPID_CLASSIFICATION_MANAGER | 0x02)] HRESULT CreatePropertyDefinition(
   [out, retval] IFsrmPropertyDefinition **propertyDefinition
 );

propertyDefinition: Pointer to an IFsrmPropertyDefinition interface pointer (section 3.2.4.2.37) that upon completion points to a blank property definition. To have the property definition added to the server's List of Persisted Property Definitions (section 3.2.1.6), the client MUST call Commit (section 3.2.4.2.37.1). The caller MUST release the property definition when the caller is done with it.

Return Values: The method MUST return zero on success, or a nonzero error code on failure.

Return value/code

Description

0x80070057

E_INVALIDARG

The propertyDefinition parameter is NULL.

Upon receiving this message, the server MUST validate parameters:

  • Verify that PropertyDefinition is not NULL.

If any validation fails, the server MUST terminate processing and return a nonzero error code.

Upon successful validation of parameters, the server MUST perform the following actions.

  • Create a new Non-Persisted Property Definition Instance.

    • Set FSRM Base Object.Id to a GUID.

    • Set Property Definition.Type to FsrmPropertyDefinitionType_Unknown.

    • Set Property Definition.Name to an empty string.

    • Set Property Definition.Deprecated to false.

    • Set Property Definition.Global to false.

    • Set Property Definition.AppliesTo to Files.

    • Set Property Definition.Secure to false.

    • Set Possible values to an empty list.

    • Set Value descriptions to an empty list.

  • Set propertyDefinition to the IFsrmPropertyDefinition interface pointer for the newly created Non-Persisted Property Definition Instance.