WindowsXP/admin/wmi/wbem/winmgmt/specs/html/interface_iwbemproviderinitsink.htm
2025-04-27 07:49:33 -04:00

313 lines
13 KiB
HTML

<html>
<head>
<title>Interface IWbemProviderInitSink</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>
<body>
<p>&nbsp;<font FACE="Arial Narrow" SIZE="6" COLOR="#800000"></p>
<p></font><b><font FACE="Arial Narrow" SIZE="6">Interface IWbemProviderInitSink</font><font
FACE="Arial Narrow" SIZE="1" COLOR="#800000">¦@¦</font></b><font SIZE="2"
COLOR="#ff00ff"></p>
<p>&lt;span style=color:#FF0000&gt;</font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff">&lt;/span&gt;</font><font
FACE="Arial" SIZE="2"> </p>
<p>The <b>IWbemProviderInitSink</b> interface is exported by CIMOM and called by the
provider during the initialization sequence. </p>
<p>&nbsp;<b></p>
<p>Methods in Vtable Order</b></font></p>
<table CELLSPACING="0" BORDER="0" WIDTH="463">
<tr>
<td WIDTH="37%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><b>IUnknown Methods</b></font></td>
<td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><b>Description</b></font></td>
</tr>
<tr>
<td WIDTH="37%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u><b>QueryInterface</b></u></font><font
FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemProviderInitSink_QueryInterface</font></td>
<td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Determines if the current object
supports a given interface.</font></td>
</tr>
<tr>
<td WIDTH="37%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u><b>Addref</b></u></font><font
FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemProviderInitSink_Addref</font></td>
<td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Increases the object's reference
count by 1.</font></td>
</tr>
<tr>
<td WIDTH="37%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u><b>Release</b></u></font><font
FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemProviderInitSink_Release</font></td>
<td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Decrements the object's reference
count by 1, and frees the object when the reference count is zero.</font></td>
</tr>
</table>
<p>&nbsp;</p>
<table CELLSPACING="0" BORDER="0" WIDTH="463">
<tr>
<td VALIGN="TOP" COLSPAN="2"></td>
</tr>
<tr>
<td WIDTH="37%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><b>IWbemProviderInitSink Methods</b></font></td>
<td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><b>Description</b></font></td>
</tr>
<tr>
<td WIDTH="37%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u><b>SetStatus</b></u></font><font
FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IwbemProviderInitSink_SetStatus</font></td>
<td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Called by the provider to
indicate success or failure of initialization.</font></td>
</tr>
</table>
<p>&nbsp;<font FACE="Arial" SIZE="1"></p>
<p>&nbsp;</font><font FACE="Arial Narrow" SIZE="5" COLOR="#800000"></p>
<p>&#139;^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
FACE="Arial Narrow" SIZE="5" COLOR="#800000">&#155;</font><b><font FACE="Arial Narrow"
SIZE="5">IWbemProviderInitSink::QueryInterface</font><font FACE="Arial Narrow" SIZE="1"
COLOR="#800000">¦@¦</font></b><font SIZE="2" COLOR="#ff00ff"></p>
<p>&lt;span style=color:#FF0000&gt;</font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff">&lt;/span&gt;</font><font
FACE="Arial" SIZE="2"> </p>
<p>The <b>IWbemProviderInitSink::QueryInterface</b> method determines if the object
supports a particular COM interface. If it does, the system increases the object's
reference count, and the application can use that interface immediately.</font><font
FACE="Lucida Sans Typewriter" SIZE="2"><b></p>
<p>HRESULT IWbemProviderInitSink::QueryInterface(</p>
<p>[in] REFIID</b><i> riid</i><b>,</p>
<p>[out] LPVOID</b><i> *ppv</i><b></p>
<p>);</b></p>
<p></font><font FACE="Arial Narrow"><b>&nbsp;</p>
<p>Parameters</b></font><font FACE="Arial" SIZE="2"><i></p>
<p>riid</p>
<blockquote>
</i><p>The COM interface identifier of the requested interface.</p>
</blockquote>
<p>&nbsp;<i></p>
<p>obp</p>
<blockquote>
</i><p>Address of a pointer that will be filled with the interface pointer if the query
succeeds.</p>
</font><font FACE="Arial" SIZE="1"><p></font>&nbsp;</p>
</blockquote>
<p>&nbsp;<font FACE="Arial Narrow"><b></p>
<p>Return Values</b></font><font FACE="Arial" SIZE="2"></p>
<p>Returns standard COM error codes for <b>QueryInterface</b>. It returns WBEM_S_NO_ERROR
if the call succeeds. If the call fails because the requested interface was not supported,
the method returns E_NOINTERFACE.</font><font FACE="Arial Narrow"><b></p>
<p>Remarks</b></font><font FACE="Arial" SIZE="2"></p>
<p>When the application no longer needs the interface retrieved by a call to this method,
it must call the <b>Release</b> method for that interface to free it. The <b>QueryInterface</b>
method allows the extension of objects without interfering with each object's existing or
future functionality.</p>
<p>This method is part of the <b>IUnknown</b> interface inherited by the object. For more
information about this method, see the COM documentation in the Microsoft Platform SDK.</font><b><font
FACE="Arial Narrow"></p>
<p>See Also</font><font FACE="Arial" SIZE="2"><u></p>
<p>IUnknown Interface Basics</u></font></b><font FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IUnknown_Interface_Basics</font><font
FACE="Arial" SIZE="2"> </font><font FACE="Arial Narrow" SIZE="5" COLOR="#800000"></p>
<p>&#139;^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
FACE="Arial Narrow" SIZE="5" COLOR="#800000">&#155;</font><b><font FACE="Arial Narrow"
SIZE="5">IWbemProviderInitSink::AddRef</font><font FACE="Arial Narrow" SIZE="1"
COLOR="#800000">¦@¦</font></b><font SIZE="2" COLOR="#ff00ff"></p>
<p>&lt;span style=color:#FF0000&gt;</font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff">&lt;/span&gt;</font><font
FACE="Arial" SIZE="2"> </p>
<p>The <b>IWbemProviderInitSink::AddRef</b> method increases the object's reference count
by 1.</font><font FACE="Lucida Sans Typewriter" SIZE="2"><b></p>
<p>ULONG AddRef( );</b></p>
<p></font><font FACE="Arial Narrow"><b>&nbsp;</p>
<p>Parameters</b></font><font FACE="Arial" SIZE="2"></p>
<p>None.</font><font FACE="Arial Narrow"><b></p>
<p>Return Values</b></font><font FACE="Arial" SIZE="2"></p>
<p>Returns the new reference count.</font><font FACE="Arial Narrow"><b></p>
<p>Remarks</b></font><font FACE="Arial" SIZE="2"></p>
<p>When the object is created, its reference count is set to 1. Every time an application
obtains an interface to the object or calls the <b>AddRef</b> method, the object's
reference count is increased by 1. Use the <u><b>Release</b></u></font><font FACE="Arial"
SIZE="2" COLOR="#800000">_hmm_IWbemProviderInitSink_Release</font><font FACE="Arial"
SIZE="2"> method to decrease the object's reference count by 1. </p>
<p>This method is part of the <b>IUnknown</b> interface inherited by the object. For a
complete discussion of <b>IUnknown</b> methods, see <b>IUnknown Programming Basics</b>.</p>
<p>For more information about this method, see the COM documentation in the Microsoft
Platform SDK.</font><b><font FACE="Arial Narrow"></p>
<p>See Also</font><font FACE="Arial" SIZE="2"><u></p>
<p>IUnknown Interface Basics</u></font></b><font FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IUnknown_Interface_Basics</font><font
FACE="Arial" SIZE="2"> </font><font FACE="Arial Narrow" SIZE="5" COLOR="#800000"></p>
<p>&#139;^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
FACE="Arial Narrow" SIZE="5" COLOR="#800000">&#155;</font><b><font FACE="Arial Narrow"
SIZE="5">IWbemProviderInitSink::Release</font><font FACE="Arial Narrow" SIZE="1"
COLOR="#800000">¦@¦</font></b><font SIZE="2" COLOR="#ff00ff"></p>
<p>&lt;span style=color:#FF0000&gt;</font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff">&lt;/span&gt;</font><font
FACE="Arial" SIZE="2"> </p>
<p>The <b>IWbemProviderInitSink::Release</b> method decreases the object's reference count
by 1.</font><b><font FACE="Lucida Sans Typewriter" SIZE="2"></p>
<p>ULONG IWbemProviderInitSink::Release( );</p>
<p></font><font FACE="Arial Narrow">&nbsp;</p>
<p>Parameters</font></b><font FACE="Arial" SIZE="2"></p>
<p>None.</font><font FACE="Arial Narrow"><b></p>
<p>Return Values</b></font><font FACE="Arial" SIZE="2"></p>
<p>Returns the new reference count.</font><font FACE="Arial Narrow"><b></p>
<p>Remarks</b></font><font FACE="Arial" SIZE="2"></p>
<p>The object deallocates itself when its reference count reaches zero. Use the <u><b>AddRef</b></u></font><font
FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemProviderInitSink_AddRef</font><font
FACE="Arial" SIZE="2"> method to increase the object's reference count by 1.</p>
<p>This method is part of the <b>IUnknown</b> interface inherited by the object. For more
information about this method, see the COM documentation in the Microsoft Platform SDK.</font><b><font
FACE="Arial Narrow"></p>
<p>See Also</font><font FACE="Arial" SIZE="2"><u></p>
<p>IUnknown Interface Basics</u></font></b><font FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IUnknown_Interface_Basics</font><font
FACE="Arial" SIZE="2"> </font><font FACE="Arial Narrow" SIZE="5" COLOR="#800000"></p>
<p>&#139;^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
FACE="Arial Narrow" SIZE="5" COLOR="#800000">&#155;</font><b><font FACE="Arial Narrow"
SIZE="5">IWbemProviderInitSink::SetStatus</font><font FACE="Arial Narrow" SIZE="1"
COLOR="#800000">¦@¦</font></b><font SIZE="2" COLOR="#ff00ff"></p>
<p>&lt;span style=color:#FF0000&gt;</font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff">&lt;/span&gt;</font><font
FACE="Arial" SIZE="2"> </p>
<p>The <b>IWbemProviderInitSink::SetStatus</b> method indicates to CIMOM whether a
provider is fully or partially initialized. </font><font FACE="Lucida Sans Typewriter"
SIZE="2"><b></p>
<p>HRESULT IWbemProviderInitSink::SetStatus(</p>
<p>[in] LONG </b><i>lStatus</i><b>, </p>
<p>[in] LONG </b><i>lFlags</i><b></p>
<p>);</b></p>
<p></font><font FACE="Arial Narrow"><b>&nbsp;</p>
<p>Parameters</b></font><font FACE="Arial" SIZE="2"><i></p>
<p>lStatus</p>
<blockquote>
</i><p>Indicates to CIMOM a provider's initialization status. One of the following values
can be set: </font></p>
</blockquote>
<p ALIGN="LEFT">&nbsp;</p>
<table CELLSPACING="0" BORDER="0" WIDTH="445">
<tr>
<td WIDTH="31%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><b>Value</b></font></td>
<td WIDTH="69%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><b>Description</b></font></td>
</tr>
<tr>
<td WIDTH="31%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><b>WBEM_S_INITIALIZED</b> </font></td>
<td WIDTH="69%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Indicates that the provider is
fully initialized and ready to accept requests.</font></td>
</tr>
<tr>
<td WIDTH="31%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><b>WBEM_S_LIMITED_SERVICE</b></font></td>
<td WIDTH="69%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Indicates that the provider is
partially initialized. The provider is not ready to accept client requests, but can accept
requests made by other providers during their attempts to initialize.</font></td>
</tr>
<tr>
<td WIDTH="31%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><b>WBEM_E_FAILED </b></font></td>
<td WIDTH="69%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Indicates that the provider has
failed to initialize and is not functional.</font></td>
</tr>
</table>
<p>&nbsp;<font FACE="Arial" SIZE="2"><i></p>
<p>lFlags</p>
<blockquote>
</i><p>Reserved. It must be zero.</p>
</font><font FACE="Arial" SIZE="1"><p></font>&nbsp;</p>
</blockquote>
<p>&nbsp;<font FACE="Arial Narrow"><b></p>
<p>Return Values</b></font><font FACE="Arial" SIZE="2"></p>
<p>CIMOM always returns WBEM_S_NO_ERROR.</font><font FACE="Arial Narrow"><b></p>
<p>Remarks</b></font><font FACE="Arial" SIZE="2"></p>
<p>All types of providers calls <b>IWbemProviderInitSink::SetStatus</b> to indicate its
initialization status to CIMOM.</p>
<p>If <i>lStatus</i> is set to WBEM_S_INITIALIZED, CIMOM expects the provider to be fully
capable of immediately servicing requests. </p>
<p>If <i>lStatus</i> is set to WBEM_S_LIMITED_SERVICE, CIMOM will forward requests made by
other providers during their attempts to initialize, but will not forward client requests.
The provider must still eventually call <b>SetStatus</b> with WBEM_S_INITIALIZED or
WBEM_E_FAILED to indicate its final initialization status.</font><b><font
FACE="Arial Narrow"></p>
<p>See Also</font><font FACE="Arial" SIZE="2"><u></p>
<p>Initializing a Provider</u></font></b><font FACE="Arial" SIZE="2" COLOR="#800000">_hmm_Initializing_a_Provider</font></p>
</body>
</html>