3.2.4.2.26.5 CreateAction (Opnum 16)

The CreateAction method creates an action for this file screen object.

 [id(FSRM_DISPID_FILESCREEN_BASE | 0x01)] HRESULT CreateAction(
   [in] FsrmActionType actionType,
   [out, retval] IFsrmAction** action
 );

actionType: Contains the type of action to be created.

action: Pointer to an IFsrmAction interface pointer (section 3.2.4.2.4) that upon completion points to the newly created action. A caller MUST release the object received 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

0x80045303

FSRM_E_ALREADY_EXISTS

The object already exists.

0x80070057

E_INVALIDARG

This code is returned for the following reasons:

  • The action parameter is NULL.

  • The actionType parameter is not a valid type. If actionType is FsrmActionType_Unknown, the parameter MUST be considered an invalid value.

Upon receiving this message, the server MUST validate parameters:

  • Verify that actionType is a valid FsrmActionType (section 2.2.1.2.9). If the actionType is FsrmActionType_Unknown, the parameter MUST be considered an invalid value.

  • Verify that action is not NULL.

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

The server MUST create a new action object of the specified type and set action to the IFsrmAction interface of the newly created action.