<div class="content" name="QueryServiceRegistration" uuid="f3c1ae10-f700-4835-8e13-bb6b00a3cc49"><p>The IUpdateServiceManager2::QueryServiceRegistration (opnum
17) method retrieves the <span><a href="750e8355-177c-4a51-bab8-927c813819c8#gt_1692cfd4-4b1d-4566-9820-8171465bbc4b" data-linktype="relative-path">update service</a></span>
registration record for a service.</p><dl>
<dd>
<div><pre> HRESULT QueryServiceRegistration(
   [in] BSTR serviceID,
   [out, retval] IUpdateServiceRegistration** retval
 );
</pre></div>
</dd></dl><p><b>serviceID: </b>A string identifying an update
service.</p><p><b>retval: </b>An <span><a href="dd185db9-b180-48ea-ab07-2f28edb71cd0" data-linktype="relative-path">IUpdateServiceRegistration (section 3.46.4)</a></span>
instance for the given service.</p><p><b>Return Values: </b>The method MUST return
information in an <b>HRESULT</b> data structure. The severity bit in the
structure identifies the following conditions:</p><ul><li><p><span><span>  </span></span>If
the severity bit is set to 0, the method completed successfully.</p>
</li><li><p><span><span>  </span></span>If
the severity bit is set to 1, the method failed and encountered a fatal error.</p>
</li></ul><dl>
<dd>
<p>If no service registration record
is found for the given service ID, the server MUST return an error.</p>
</dd></dl><p><b>Exceptions Thrown:</b> No exceptions are thrown beyond
those thrown by the underlying RPC protocol <span><a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a></span>.</p><p>This method SHOULD return the service registration record
for the identified service from the <b>ServiceRegistrations</b> ADM element.</p></div>