3.1.4.1.18 NspiGetTemplateInfo (Opnum 13)
The NspiGetTemplateInfo method returns information about template objects in the address book.
-
long NspiGetTemplateInfo( [in] NSPI_HANDLE hRpc, [in] DWORD dwFlags, [in] DWORD ulType, [string, in, unique] char* pDN, [in] DWORD dwCodePage, [in] DWORD dwLocaleID, [out] PropertyRow_r** ppData );
hRpc: An RPC context handle, as specified in section 2.2.10.
dwFlags: A DWORD [MS-DTYP] value that contains a set of bit flags. The server MUST ignore values other than the bit flags TI_EMT, TI_SCRIPT and TI_TEMPLATE.
ulType: A DWORD value. Specifies the display type of the template for which information is requested.
pDN: The value NULL or the DN of the template requested. The value is NULL-terminated.
dwCodePage: A DWORD value. Specifies the code page of the template for which information is requested.
dwLocaleID: A DWORD value. Specifies the LCID, as specified in [MS-LCID], of the template for which information is requested.
ppData: A reference to a PropertyRow_r value. On return, it contains the information requested.
Return Values: The server returns a long value that specifies the return status of the method.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol, as specified in [MS-RPCE].
Server Processing Rules: Upon receiving this message, the server MUST process the data from the message subject to the following constraints:
If the server returns any return value other than "Success", the server MUST return the value NULL in the return parameters ppData.
The server MAY make additional validations, as described in section 5. If the server chooses to limit the visibility of data based on these validations, the server MUST proceed as if that data did not exist in the address book.
If the codepage specified in the dwCodePage input parameter has the value CP_WINUNICODE, the server MUST return the value "InvalidCodePage".
If the server does not recognize the codepage specified in the dwCodePage input parameter as a supported code page, the server MUST return the value "InvalidCodePage".
The server locates the template for which it will return information as follows:
If the input parameter pDN is NULL, the server MUST choose an appropriate template object for the display type specified by the input parameter ulType and for the LCID specified by the input parameter dwLocaleID. The specific choice of an appropriate template object is defined by local policy, and is not constrained by the Exchange Server NSPI Protocol. For details, see [MS-OXOABKT].
If the input parameter pDN is not NULL, it specifies the DN of a template object in the address book. In this case, the server MUST ignore the input parameters ulType and dwLocaleID.
If the server is unable to locate a specific object based on these constraints, the server MUST return the value "InvalidLocale".
The server constructs a PropertyRow_r value. The property values in this PropertyRow_r are specified as follows:
If the input parameter dwFlags has the TI_SCRIPT bit set, the client is requesting the script data for the template, as specified in [MS-OXOABKT]. The server MUST place this data into the PropertyRow_r structure.
If the input parameter dwFlags has the TI_TEMPLATE bit set, the client is requesting the user interface data for the template, as specified in the [MS-OXOABKT]. The server MUST place this data into the PropertyRow_r structure.
The server MUST return the constructed PropertyRow_r structure in the output parameter ppData.
If no other return values have been specified by these constraints, the server MUST return the return value "Success".