<div class="content" name="RpcGetSessionType" uuid="e7deb145-e33f-4ec0-a2ac-524b0381493d"><p>The RpcGetSessionType method gets the type associated with
the specified session. No special permissions are required to call this method.<a id="Appendix_A_Target_150"></a><a aria-label="Product behavior note 150" href="7ce7f717-461b-4f18-9829-6690168c7707#Appendix_A_150" data-linktype="relative-path">&lt;150&gt;</a></p><dl>
<dd>
<div><pre> HRESULT RpcGetSessionType(
   [in] handle_t hBinding,
   [in] LONG* SessionId,
   [out] ULONG* pSessionType
 );
</pre></div>
</dd></dl><p><b>hBinding: </b>The <span><a href="c41d3367-04c9-4c93-babf-9b5de834eb29#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span> binding <span><a href="c41d3367-04c9-4c93-babf-9b5de834eb29#gt_5044babb-08e3-4bb9-bc12-fe8f542b05ee" data-linktype="relative-path">handle</a></span>.
For more information, see <span><a href="https://go.microsoft.com/fwlink/?LinkId=93771" data-linktype="external">[MSDN-RPCBIND]</a></span>.</p><p><b>SessionId: </b>The identifier of the session whose
type is being retrieved.</p><p><b>pSessionType: </b>The type of the session as
defined in <span><a href="12510151-f01d-4984-a1bb-64ec4298c31c" data-linktype="relative-path">SESSIONTYPE (section 2.2.1.18)</a></span>.</p><p><b>Return Values: </b>The method MUST return S_OK
(0x00000000) on success; otherwise, it MUST return an implementation-specific
negative value.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x00000000 S_OK</td>
  <td>Successful completion.</td>
 </tr></tbody></table>
</dd></dl><p> </p></div>