<div class="content"><p> </p><p>The NspiGetTemplateInfo method returns information about
template objects in the address book.</p><dl>
<dd>
<div><pre> long NspiGetTemplateInfo(
   [in] NSPI_HANDLE hRpc,
   [in] DWORD dwFlags,
   [in] DWORD ulType,
   [in, unique] [string] char* pDN,
   [in] DWORD dwCodePage,
   [in] DWORD dwLocaleID,
   [out] PropertyRow_r** ppData
 );
</pre></div>
</dd></dl><p><b>hRpc: </b>An <span><a href="1b8009c5-72bc-41da-bbab-612b31da4410#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span> context handle
as specified in section <span><a href="67195f6a-2002-4d81-b279-ba8b0aefb4af" data-linktype="relative-path">2.3.9</a></span>.</p><p><b>dwFlags: </b>A <span><a href="../ms-dtyp/262627d8-3418-4627-9218-4ffe110850b2" data-linktype="relative-path">DWORD</a></span>
value containing a set of bit flags. The server MUST ignore values other than
the bit flags TI_HELPFILE_NAME, TI_HELPFILE_CONTENTS, TI_SCRIPT, TI_TEMPLATE,
and TI_EMT.</p><p><b>ulType: </b>A DWORD value. Specifies the <span><a href="1b8009c5-72bc-41da-bbab-612b31da4410#gt_09ba95e7-c783-4c4b-880a-eac356f54878" data-linktype="relative-path">display
type</a></span> of the template for which information is requested.</p><p><b>pDN: </b>The value NULL or the <span><a href="1b8009c5-72bc-41da-bbab-612b31da4410#gt_1175dd11-9368-41d5-98ed-d585f268ad4b" data-linktype="relative-path">DN</a></span>
of the template requested. The value is NULL-terminated. </p><p><b>dwCodePage: </b>A DWORD value. Specifies the <span><a href="1b8009c5-72bc-41da-bbab-612b31da4410#gt_210637d9-9634-4652-a935-ded3cd434f38" data-linktype="relative-path">codepage</a></span>
of the template for which information is requested.</p><p><b>dwLocaleID: </b>A DWORD value. Specifies the <span><a href="1b8009c5-72bc-41da-bbab-612b31da4410#gt_c7f99c66-592f-4053-b62a-878c189653b6" data-linktype="relative-path">LCID</a></span>
of the template for which information is requested.</p><p><b>ppData: </b>A reference to a <span><a href="e627a2d6-4a92-42f7-b1e6-54400373f371" data-linktype="relative-path">PropertyRow_r</a></span>
value. On return, it contains the information requested.</p><p><b>Return Values: </b>The server returns a long value
specifying the return status of the method.</p><p>Exceptions Thrown</p><p>No exceptions are thrown beyond those thrown by the
underlying RPC protocol, as specified in <span><a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a></span>.</p><p>Server Processing Rules</p><p>Upon receiving this message, the server MUST process the
data from the message subject to the following constraints: </p><ol><li><p><span>    </span>If the server
returns any return value other than Success, the server MUST return the value
NULL in the return parameters <i>ppData</i>.</p>
</li><li><p><span>    </span>The server MAY
make additional validations as described in section <span><a href="39bcbcd7-fa18-4eb2-a2ae-c598b6683185" data-linktype="relative-path">5</a></span>. 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. See the product
behavior note cited in section <span><a href="36c0f768-1fdd-4709-9875-6c387b107560" data-linktype="relative-path">5.1</a></span> for more
information.</p>
</li><li><p><span>    </span>If the codepage
specified in the <i>dwCodePage</i> input parameter has the value CP_WINUNICODE,
the server MUST return the value InvalidCodePage.</p>
</li><li><p><span>    </span>If the server
does not recognize the codepage specified in the <i>dwCodePage</i> input
parameter as a supported codepage, the server MUST return the value
InvalidCodePage.</p>
</li><li><p><span>    </span>The server
locates the template for which it will return information as follows: </p>
<ol><li><p><span>   
</span>If the input parameter <i>pDN</i> is NULL, the server MUST choose an
appropriate template object for the display type specified by the input
parameter <i>ulType</i> and for the LCID specified by the input parameter <i>dwLocaleID</i>.
The specific choice of an appropriate template object is defined by local
policy, and is not constrained by the NSPI Protocol. See <span><a href="/en-us/openspecs/exchange_server_protocols/MS-OXOABKT/cd5a3e78-1eeb-4a75-88eb-e82c8c96ff31" data-linktype="absolute-path">[MS-OXOABKT]</a></span>.</p>
</li><li><p><span>   
</span>If the input parameter <i>pDN</i> 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 <i>ulDispType</i> and <i>dwLocaleID</i>. </p>
</li><li><p><span>   
</span>If the server is unable to locate a specific object based on these
constraints, the server MUST return the value InvalidLocale.</p>
</li></ol></li><li><p><span>    </span>The server
constructs an PropertyRow_rvalue. This property values in this PropertyRow_rare
specified as follows:</p>
<ol><li><p><span>   
</span>If the input parameter <b>dwFlags</b> has the TI_HELPFILE_NAME bit set,
the client is requesting the helpfile name data for the template, as described
in [MS-OXOABKT]. The server MUST place this data into the PropertyRow_r.</p>
</li><li><p><span>   
</span>If the input parameter <b>dwFlags</b> has the TI_HELPFILE_CONTENTS bit
set, the client is requesting the helpfile contents data for the template, as
described in [MS-OXOABKT]. The server MUST place this data into the
PropertyRow_r.</p>
</li><li><p><span>   
</span>If the input parameter <b>dwFlags</b> has the TI_SCRIPT bit set, the
client is requesting the script data for the template, as described in
[MS-OXOABKT]. The server MUST place this data into the PropertyRow_r.</p>
</li><li><p><span>   
</span>If the input parameter <b>dwFlags</b> has the TI_TEMPLATE bit set, the
client is requesting the user interface data for the template, as described in
the [MS-OXOABKT]. The server MUST place this data into the PropertyRow_r.</p>
</li><li><p><span>   
</span>If the input parameter <b>dwFlags</b> has the TI_EMT set, the client is
requesting the address type data for the template, as described in
[MS-OXOABKT]. The server MUST place this data into the PropertyRow_r.</p>
</li></ol></li><li><p><span>    </span>The server MUST
return the constructed PropertyRow_rin the output parameter <i>ppData</i>.</p>
</li><li><p><span>    </span>If no other
return values have been specified by these constraints, the server MUST return
the return value Success.</p>
</li></ol></div>