3.2.4.2.36.2 CreateScheduleTask (Opnum 8)
The CreateScheduleTask method creates a task that is capable of triggering the generation of a File Server Resource Manager Protocol report job.
-
[id(FSRM_DISPID_REPORT_SCHEDULER | 0x02)] HRESULT CreateScheduleTask( [in] BSTR taskName, [in] VARIANT* namespacesSafeArray, [in] BSTR serializedTask );
taskName: Contains the name of the Task Scheduler task to create.
namespacesSafeArray: Pointer to a variable that contains a VARIANT structure, which contains a SAFEARRAY of VARIANT structures. The VARIANT structures contained in the SAFEARRAY MUST be BSTR string values, each representing a local directory path that needs to be verified as supported by the File Server Resource Manager Protocol storage.
serializedTask: Contains the XML representation of the task to be created.<63>
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.
0x80045311
FSRM_E_NOT_SUPPORTED
This function is not supported for this object.
0x80045316
FSRM_E_UNEXPECTED
An unexpected error occurred; check the application event log. You might get this error if the XML is malformed.
0x80070057
E_INVALIDARG
This code is returned for the following reasons:
The taskName parameter is NULL.
The namespacesSafeArray parameter is NULL.
The serializedTask parameter is NULL.
Upon receiving this message, the server MUST validate parameters:
Verify that taskName is not NULL.
Verify that namespacesSafeArray is not NULL.
Verify that serializedTask is not NULL.
If any validation fails, the server MUST terminate processing and return a nonzero error code.
The server MUST create the specified task in such a way that it is capable of triggering the File Server Resource Manager Protocol report jobs.