3.2.4.2.32.2 GetTemplate (Opnum 8)

The GetTemplate method returns a pointer to the file screen template with the specified Name from the List of Persisted File Screen Templates (section 3.2.1.3).

 [id(FSRM_DISPID_FILESCREEN_TEMPLATE_MANAGER | 0x02)] HRESULT GetTemplate(
   [in] BSTR name,
   [out, retval] IFsrmFileScreenTemplate** fileScreenTemplate
 );

name: Contains the Name of the file screen template to return.

fileScreenTemplate: Pointer to an IFsrmFileScreenTemplate interface pointer (section 3.2.4.2.30) that upon completion points to the file screen template with the specified Name. The caller MUST release the file screen template 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

0x80045301

FSRM_E_NOT_FOUND

The specified template could not be found.

0x80045308

FSRM_E_INVALID_NAME

The specified name is not valid.

0x8004530D

FSRM_E_OUT_OF_RANGE

The content of the fileScreenTemplateName parameter exceeds the maximum length of 4,000 characters.

0x80070057

E_INVALIDARG

The fileScreenTemplate parameter is NULL.

Upon receiving this message, the server MUST validate parameters:

  • Verify that fileScreenTemplate 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 or return a nonzero error code.

If a file screen template with name does not exist, the server MUST return FSRM_E_NOT_FOUND.