982 lines
		
	
	
		
			41 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			982 lines
		
	
	
		
			41 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <html>
 | ||
| 
 | ||
| <head>
 | ||
| <title>Interface IWbemContext</title>
 | ||
| <meta name="GENERATOR" content="Microsoft FrontPage 3.0">
 | ||
| </head>
 | ||
| 
 | ||
| <body>
 | ||
| <font FACE="Arial Narrow" SIZE="6" COLOR="#800000">
 | ||
| 
 | ||
| <p></font><font FACE="Arial Narrow" SIZE="6"><b>Interface IWbemContext</b></font><font
 | ||
| SIZE="2" COLOR="#ff00ff"></p>
 | ||
| </font>
 | ||
| 
 | ||
| <p><font FACE="Arial" SIZE="2">The <b>IWbemContext</b> interface communicates additional
 | ||
| information to providers when submitting <u><b>IWbemServices</b></u></font><font
 | ||
| FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemServices</font><font FACE="Arial" SIZE="2"><i>
 | ||
| </i>calls to CIMOM. All primary calls in <b>IWbemServices</b> take an optional parameter
 | ||
| pointing to an object of this type.</font></p>
 | ||
| <font FACE="Arial" SIZE="2">
 | ||
| 
 | ||
| <p>In many cases, dynamic providers need more information than the information that is
 | ||
| specified in the normal parameters of an <b>IWbemServices</b> method. For example, to
 | ||
| manipulate any CIM schema objects it provides, a provider may need to know a Simple
 | ||
| Network Management Protocol (SNMP) Community name, or an structured query language (SQL)
 | ||
| database and table name. A client can add this information to an <b>IWbemContext</b>
 | ||
| object, and send the <b>IWbemContext</b> object along with the call as one of the
 | ||
| parameters.</font><font FACE="Arial Narrow" SIZE="3"><b></p>
 | ||
| 
 | ||
| <p>Note</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </b></font><font FACE="Arial" SIZE="2"><p>It is very important that providers make as
 | ||
|   little use of this mechanism as possible. It is preferred they never require it. If a
 | ||
|   provider requires a large amount of highly specific context information to respond to a
 | ||
|   request, then all clients must be coded to provide this information, thus breaking the
 | ||
|   uniform access model that is the basis of WBEM. Nevertheless, in some cases it cannot be
 | ||
|   avoided. Therefore, this mechanism is provided to make it possible to access such
 | ||
|   providers. Developers of such providers should provide adequate documentation so that
 | ||
|   developers of client software can succesfully manipulate such CIM objects. </p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p>An <b>IWbemContext</b> object, which is created using <b>CoCreateInstanceEx</b>, is a
 | ||
| simple container of named values. You can access these methods to fill in any context
 | ||
| information required by a dynamic provider. After the call to<i> </i>one of the <b>IWbemServices</b>
 | ||
| methods, the <b>IWbemContext</b> object can be reused for another call, or it can be
 | ||
| deallocated using <b>Release</b> and another object created for other calls to <b>IWbemServices</b>
 | ||
| methods</p>
 | ||
| 
 | ||
| <p>The information contained in an <b>IWbemContext</b> object is entirely determined by
 | ||
| the underlying provider. CIMOM makes no use of the information, but simply forwards it to
 | ||
| the provider. Providers must publish the context information they require for these
 | ||
| service requests.</p>
 | ||
| 
 | ||
| <p>It is expected that the client application calls <b>CoCreateInstanceEx</b> to create a
 | ||
| single context object. Then, it calls <b>SetValue</b> one or more times to set up context
 | ||
| values for the provider. Finally, it submits the object to one of the <b>IWbemServices</b>
 | ||
| methods, which immediately calls <b>Release</b><i> </i>on the context object after the
 | ||
| call has returned. The other methods are for use primarily by providers that receive the
 | ||
| context object and have to extract information.</p>
 | ||
| 
 | ||
| <p> <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_IWbemContext_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_IWbemContext_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_IWbemContext_Release</font></td>
 | ||
|     <td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Decrements the object's reference
 | ||
|     count, and frees the object when the reference count is zero.</font></td>
 | ||
|   </tr>
 | ||
| </table>
 | ||
| 
 | ||
| <p> </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>IWbemContext 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>Clone</b></u></font><font
 | ||
|     FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IwbemContext_Clone</font></td>
 | ||
|     <td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Makes a complete copy of the
 | ||
|     current <b>IWbemContext</b> object.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="37%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u><b>GetNames</b></u></font><font
 | ||
|     FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IwbemContext_GetNames</font></td>
 | ||
|     <td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Retrieves the names of all of the
 | ||
|     context values available.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="37%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u><b>BeginEnumeration</b></u></font><font
 | ||
|     FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IwbemContext_BeginEnumeration</font></td>
 | ||
|     <td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Begins an enumeration of all
 | ||
|     context values in the <b>IwbemContext</b> object.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="37%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u><b>Next</b></u></font><font
 | ||
|     FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IwbemContext_Next</font></td>
 | ||
|     <td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Retrieves the next value in an
 | ||
|     enumeration of all context values beginning with <b>BeginEnumeration.</b></font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="37%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u><b>EndEnumeration</b></u></font><font
 | ||
|     FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemContext_EndEnumeration</font></td>
 | ||
|     <td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Ends an enumeration begun with <b>BeginEnumeration</b>
 | ||
|     and <b>Next</b>.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="37%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u><b>SetValue</b></u></font><font
 | ||
|     FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemContext_SetValue</font></td>
 | ||
|     <td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Sets a specific named context
 | ||
|     value.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="37%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u><b>GetValue</b></u></font><font
 | ||
|     FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemContext_GetValue</font></td>
 | ||
|     <td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Retrieves the specified context
 | ||
|     value by name.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="37%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u><b>DeleteValue</b></u></font><font
 | ||
|     FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IwbemContext_DeleteValue</font></td>
 | ||
|     <td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Removes the specified context
 | ||
|     value.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="37%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u><b>DeleteAll</b></u></font><font
 | ||
|     FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IwbemContext_DeleteAll</font></td>
 | ||
|     <td WIDTH="63%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Removes all context values,
 | ||
|     making the <b>IWbemContext</b> object empty.</font></td>
 | ||
|   </tr>
 | ||
| </table>
 | ||
| 
 | ||
| <p> <font FACE="Arial" SIZE="1"></p>
 | ||
| 
 | ||
| <p> </font><font FACE="Arial Narrow" SIZE="5" COLOR="#800000"></p>
 | ||
| 
 | ||
| <p>‹^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000">›</font><b><font FACE="Arial Narrow"
 | ||
| SIZE="5">IWbemContext::QueryInterface</font><font FACE="Arial Narrow" SIZE="1"
 | ||
| COLOR="#800000"><EFBFBD>@<40></font></b><font SIZE="2" COLOR="#ff00ff"></p>
 | ||
| 
 | ||
| <p><span style=color:#FF0000></font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
 | ||
| is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff"></span></font><font
 | ||
| FACE="Arial" SIZE="2"> </p>
 | ||
| 
 | ||
| <p>The <b>IWbemContext::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 IWbemContext::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> </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> <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> </p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <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>‹^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000">›</font><b><font FACE="Arial Narrow"
 | ||
| SIZE="5">IWbemContext::AddRef</font><font FACE="Arial Narrow" SIZE="1" COLOR="#800000"><EFBFBD>@<40></font></b><font
 | ||
| SIZE="2" COLOR="#ff00ff"></p>
 | ||
| 
 | ||
| <p><span style=color:#FF0000></font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
 | ||
| is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff"></span></font><font
 | ||
| FACE="Arial" SIZE="2"> </p>
 | ||
| 
 | ||
| <p>The <b>IWbemContext::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> </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 <b>Release</b> 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>
 | ||
| Interface.</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>‹^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000">›</font><b><font FACE="Arial Narrow"
 | ||
| SIZE="5">IWbemContext::Release</font><font FACE="Arial Narrow" SIZE="1" COLOR="#800000"><EFBFBD>@<40></font></b><font
 | ||
| SIZE="2" COLOR="#ff00ff"></p>
 | ||
| 
 | ||
| <p><span style=color:#FF0000></font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
 | ||
| is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff"></span></font><font
 | ||
| FACE="Arial" SIZE="2"> </p>
 | ||
| 
 | ||
| <p>The <b>IWbemContext::Release</b> method decreases the object's reference count by 1. </font><b><font
 | ||
| FACE="Lucida Sans Typewriter" SIZE="2"></p>
 | ||
| 
 | ||
| <p>ULONG Release( );</p>
 | ||
| 
 | ||
| <p></font><font FACE="Arial Narrow"> </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_IWbemContext_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>‹^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000">›</font><b><font FACE="Arial Narrow"
 | ||
| SIZE="5">IWbemContext::Clone</font><font FACE="Arial Narrow" SIZE="1" COLOR="#800000"><EFBFBD>@<40></font></b><font
 | ||
| SIZE="2" COLOR="#ff00ff"></p>
 | ||
| 
 | ||
| <p><span style=color:#FF0000></font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
 | ||
| is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff"></span></font><font
 | ||
| FACE="Arial" SIZE="2"> </p>
 | ||
| 
 | ||
| <p>The <b>IWbemContext::Clone</b> method makes a logical copy of the current <b>IWbemContext</b><i>
 | ||
| </i>object. This method can be useful when many calls must be made which have largely
 | ||
| identical <b>IWbemContext</b><i> </i>objects.</font><font FACE="Lucida Sans Typewriter"
 | ||
| SIZE="2"><b></p>
 | ||
| 
 | ||
| <p>HRESULT Clone(</p>
 | ||
| 
 | ||
| <p>[out] IWbemContext</b><i> **ppNewCopy</i><b> </p>
 | ||
| 
 | ||
| <p>);</b></p>
 | ||
| 
 | ||
| <p></font><font FACE="Arial Narrow"><b> </p>
 | ||
| 
 | ||
| <p>Parameters</b></font><font FACE="Arial" SIZE="2"><i></p>
 | ||
| 
 | ||
| <p>ppNewCopy</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </i><p>Must point to NULL on entry. It receives a pointer to the new object containing the
 | ||
|   clone of the current object. The returned pointer has a positive reference count. The
 | ||
|   caller must call <u><b>Release</b></u></font><font FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemServices_Release</font><font
 | ||
|   FACE="Arial" SIZE="2"> on this pointer when it is no longer needed. On error, this pointer
 | ||
|   is left unmodified, and a new object is not returned.</p>
 | ||
|   </font><font FACE="Arial" SIZE="1"><p></font> </p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <font FACE="Arial Narrow"><b></p>
 | ||
| 
 | ||
| <p>Return Values</b></font></p>
 | ||
| 
 | ||
| <table CELLSPACING="0" BORDER="0" WIDTH="464">
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_FAILED</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">There has been a general failure.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_INVALID_PARAMETER</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">NULL was specified as a
 | ||
|     parameter, which is not legal.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_OUT_OF_MEMORY</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">There is not enough memory to
 | ||
|     clone the object.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_S_NO_ERROR</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">The call succeeded.</font></td>
 | ||
|   </tr>
 | ||
| </table>
 | ||
| 
 | ||
| <p> <font FACE="Arial" SIZE="1"></p>
 | ||
| 
 | ||
| <p> </font><font FACE="Arial Narrow" SIZE="5" COLOR="#800000"></p>
 | ||
| 
 | ||
| <p>‹^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000">›</font><b><font FACE="Arial Narrow"
 | ||
| SIZE="5">IWbemContext::GetNames</font><font FACE="Arial Narrow" SIZE="1" COLOR="#800000"><EFBFBD>@<40></font></b><font
 | ||
| SIZE="2" COLOR="#ff00ff"></p>
 | ||
| 
 | ||
| <p><span style=color:#FF0000></font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
 | ||
| is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff"></span></font><font
 | ||
| FACE="Arial" SIZE="2"> </p>
 | ||
| 
 | ||
| <p>The <b>IWbemContext::GetNames</b> method returns a <b>SAFEARRAY</b> of all of the names
 | ||
| of the named context values. After all the names are known, <u><b>GetValue</b></u></font><font
 | ||
| FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemContext_GetValue</font><font FACE="Arial"
 | ||
| SIZE="2"> can be called on each name to retrieve the value. This technique is a way of
 | ||
| accessing the context values that is different from calling the <b>BeginEnumeration</b>, <b>Next</b>,
 | ||
| and <b>EndEnumeration </b>methods.</font><font FACE="Lucida Sans Typewriter" SIZE="2"><b></p>
 | ||
| 
 | ||
| <p>HRESULT GetNames(</p>
 | ||
| 
 | ||
| <p>[in] LONG </b><i>lFlags</i><b>,</p>
 | ||
| 
 | ||
| <p>[out] SAFEARRAY (BSTR) </b><i>*pNames</i><b></p>
 | ||
| 
 | ||
| <p>);</b></p>
 | ||
| 
 | ||
| <p></font><font FACE="Arial Narrow"><b> </p>
 | ||
| 
 | ||
| <p>Parameters</b></font><font FACE="Arial" SIZE="2"><i></p>
 | ||
| 
 | ||
| <p>lFlags</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </i><p>Reserved. It must be zero.</p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <i></p>
 | ||
| 
 | ||
| <p>pNames</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </i><p>This parameter cannot be NULL, but on entry it must point to NULL. If no error is
 | ||
|   returned, on exit <i>pstrNames</i> receives a pointer to a new <b>SAFEARRAY</b> of type
 | ||
|   VT_BSTR containing all the context value names. The caller must call<b> SafeArrayDestroy</b><i>
 | ||
|   </i>on the returned pointer when the array is no longer required. If an error code is
 | ||
|   returned, the pointer is left unmodified.</p>
 | ||
|   </font>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <font FACE="Arial Narrow" SIZE="3"><b></p>
 | ||
| 
 | ||
| <p>Note</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </b></font><font FACE="Arial" SIZE="2"><p>If there are no named values in the object, the
 | ||
|   call succeeds and returns an array of length zero.</p>
 | ||
|   </font><font FACE="Arial" SIZE="1"><p></font> </p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <font FACE="Arial Narrow"><b></p>
 | ||
| 
 | ||
| <p>Return Values</b></font></p>
 | ||
| 
 | ||
| <table CELLSPACING="0" BORDER="0" WIDTH="464">
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_INVALID_PARAMETER</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">An invalid parameter was
 | ||
|     specified.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_OUT_OF_MEMORY</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">There was not enough memory to
 | ||
|     complete the operation.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_S_NO_ERROR</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">The call succeeded.</font></td>
 | ||
|   </tr>
 | ||
| </table>
 | ||
| 
 | ||
| <p> <font FACE="Arial" SIZE="1"></p>
 | ||
| 
 | ||
| <p> </font><b><font FACE="Arial Narrow"></p>
 | ||
| 
 | ||
| <p>See Also</font><font FACE="Arial" SIZE="2"><u></p>
 | ||
| 
 | ||
| <p>IWbemContext::GetValue</u></font></b><font FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemContext_GetValue</font><font
 | ||
| FACE="Arial" SIZE="2">, <u><b>IWbemContext::BeginEnumeration</b></u></font><font
 | ||
| FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemContext_BeginEnumeration</font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000"></p>
 | ||
| 
 | ||
| <p>‹^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000">›</font><b><font FACE="Arial Narrow"
 | ||
| SIZE="5">IWbemContext::BeginEnumeration</font><font FACE="Arial Narrow" SIZE="1"
 | ||
| COLOR="#800000"><EFBFBD>@<40></font></b><font SIZE="2" COLOR="#ff00ff"></p>
 | ||
| 
 | ||
| <p><span style=color:#FF0000></font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
 | ||
| is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff"></span></font><font
 | ||
| FACE="Arial" SIZE="2"> </p>
 | ||
| 
 | ||
| <p>The <b>IWbemContext::BeginEnumeration</b> method resets the enumeration of all the
 | ||
| context values in the object. This method must be called before the first call to <u><b>IWbemContext::Next</b></u></font><font
 | ||
| FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemContext_Next</font><font FACE="Arial"
 | ||
| SIZE="2"> to enumerate all of the context values in<i> </i>the object.</font><font
 | ||
| FACE="Lucida Sans Typewriter" SIZE="2"><b></p>
 | ||
| 
 | ||
| <p>HRESULT BeginEnumeration(</p>
 | ||
| 
 | ||
| <p>[in] LONG </b><i>lFlags</i><b> </p>
 | ||
| 
 | ||
| <p>);</b></p>
 | ||
| 
 | ||
| <p></font><font FACE="Arial Narrow"><b> </p>
 | ||
| 
 | ||
| <p>Parameters</b></font><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> </p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <font FACE="Arial Narrow"><b></p>
 | ||
| 
 | ||
| <p>Return Values</b></font></p>
 | ||
| 
 | ||
| <table CELLSPACING="0" BORDER="0" WIDTH="463">
 | ||
|   <tr>
 | ||
|     <td WIDTH="52%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_INVALID_PARAMETER</font></td>
 | ||
|     <td WIDTH="48%" VALIGN="TOP"><font FACE="Arial" SIZE="2">The <i>lFlags</i> parameter was
 | ||
|     not valid.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="52%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_S_NO_ERROR</font></td>
 | ||
|     <td WIDTH="48%" VALIGN="TOP"><font FACE="Arial" SIZE="2">The call succeeded.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="52%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_OUT_OF_MEMORY</font></td>
 | ||
|     <td WIDTH="48%" VALIGN="TOP"><font FACE="Arial" SIZE="2">There was not enough memory to
 | ||
|     begin an enumeration.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="52%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_FAILED</font></td>
 | ||
|     <td WIDTH="48%" VALIGN="TOP"><font FACE="Arial" SIZE="2">There has been a general failure.</font></td>
 | ||
|   </tr>
 | ||
| </table>
 | ||
| 
 | ||
| <p> <font FACE="Arial" SIZE="1"></p>
 | ||
| 
 | ||
| <p> </font><b><font FACE="Arial Narrow"></p>
 | ||
| 
 | ||
| <p>See Also</font><font FACE="Arial" SIZE="2"><u></p>
 | ||
| 
 | ||
| <p>IWbemContext::Next</u></font></b><font FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemContext_Next</font><font
 | ||
| FACE="Arial" SIZE="2">, <u><b>IWbemContext::EndEnumeration</b></u></font><font
 | ||
| FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemContext_EndEnumeration</font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000"></p>
 | ||
| 
 | ||
| <p>‹^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000">›</font><b><font FACE="Arial Narrow"
 | ||
| SIZE="5">IWbemContext::Next</font><font FACE="Arial Narrow" SIZE="1" COLOR="#800000"><EFBFBD>@<40></font></b><font
 | ||
| SIZE="2" COLOR="#ff00ff"></p>
 | ||
| 
 | ||
| <p><span style=color:#FF0000></font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
 | ||
| is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff"></span></font><font
 | ||
| FACE="Arial" SIZE="2"> </p>
 | ||
| 
 | ||
| <p>The <b>IWbemContext::Next</b> method retrieves the next value in an enumeration of all
 | ||
| context values beginning with <b>BeginEnumeration</b>.</font><font
 | ||
| FACE="Lucida Sans Typewriter" SIZE="2"><b></p>
 | ||
| 
 | ||
| <p>HRESULT Next(</p>
 | ||
| 
 | ||
| <p>[in] LONG </b><i>lFlags</i><b>,</p>
 | ||
| 
 | ||
| <p>[out] BSTR </b><i>*pstrName</i><b>,</b></p>
 | ||
| 
 | ||
| <p><b>[out] VARIANT</b> <i>*pValue</i> </p>
 | ||
| 
 | ||
| <p> <b></p>
 | ||
| 
 | ||
| <p>);</b></p>
 | ||
| 
 | ||
| <p></font><font FACE="Arial Narrow"><b> </p>
 | ||
| 
 | ||
| <p>Parameters</b></font><font FACE="Arial" SIZE="2"><i></p>
 | ||
| 
 | ||
| <p>lFlags</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </i><p>Reserved. It must be zero.</p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <i></p>
 | ||
| 
 | ||
| <p>pstrName</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </i><p>This parameter cannot be NULL. The pointer must not point to an active BSTR on
 | ||
|   entry, and ideally it should be set to point to NULL. If no error code is returned, it is
 | ||
|   set to point to a newly allocated BSTR containing the context value name.</p>
 | ||
|   <p>The caller must call <b>SysFreeString</b> on the returned string when it is no longer
 | ||
|   required. If WBEM_S_NO_MORE_DATA returns, <i>pstrName </i>is set to point to NULL, in
 | ||
|   which case <b>SysFreeString</b> should not be called.</p>
 | ||
|   </font>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <font FACE="Arial Narrow" SIZE="3"><b></p>
 | ||
| 
 | ||
| <p>Note</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </b></font><font FACE="Arial" SIZE="2"><p>If <i>pstrName</i> points to a valid BSTR on
 | ||
|   entry, this BSTR is not freed, and a memory leak occurs.</p>
 | ||
|   </font>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <font FACE="Arial" SIZE="2"><i></p>
 | ||
| 
 | ||
| <p>pValue</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </i><p>This parameter cannot be NULL, and it must point to an empty or uninitialized <b>VARIANT</b>.
 | ||
|   If no error is returned, the <b>VARIANT</b> is initialized using <b>VariantInit</b>, and
 | ||
|   then set to contain the context value. The caller must call <b>VariantClear</b> on this
 | ||
|   pointer when the value is no longer required. If an error code is returned, the <b>VARIANT</b>
 | ||
|   pointed to by <i>pValue </i>is left unmodified.</p>
 | ||
|   <p>If WBEM_S_NO_MORE_DATA returns, this parameter is set to point to a <b>VARIANT</b> of
 | ||
|   type VT_NULL.</p>
 | ||
|   <p>It is possible that an entire <b>IWbemClassObject </b>may be returned inside the <b>VARIANT</b>.
 | ||
|   If that is the case, then VT_UNKNOWN is the <b>VARIANT</b> type. The caller can take the <b>IUnknown</b>
 | ||
|   pointer and execute <b>QueryInterface</b><i> </i>to obtain the <b>IWbemClassObject</b>
 | ||
|   pointer.</p>
 | ||
|   </font>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <font FACE="Arial Narrow" SIZE="3"><b></p>
 | ||
| 
 | ||
| <p>Note</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </b></font><font FACE="Arial" SIZE="2"><p>At the end of the enumeration,
 | ||
|   WBEM_S_NO_MORE_DATA returns. The returned <b>VARIANT</b> is of type VT_NULL, and the
 | ||
|   returned <i>pstrName </i>is NULL.</p>
 | ||
|   </font><font FACE="Arial" SIZE="1"><p></font> </p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <font FACE="Arial Narrow"><b></p>
 | ||
| 
 | ||
| <p>Return Values</b></font></p>
 | ||
| 
 | ||
| <table CELLSPACING="0" BORDER="0" WIDTH="464">
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_INVALID_PARAMETER</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">An invalid parameter was
 | ||
|     specified.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_UNEXPECTED</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">Caller did not call <u><b>IWbemContext::BeginEnumeration</b></u></font><font
 | ||
|     FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemContext_BeginEnumeration</font><font
 | ||
|     FACE="Arial" SIZE="2">.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_S_NO_ERROR</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">The call succeeded.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_S_NO_MORE_DATA</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">No more properties are left in
 | ||
|     the enumeration.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_OUT_OF_MEMORY</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">There was not enough memory to
 | ||
|     complete the call.</font></td>
 | ||
|   </tr>
 | ||
| </table>
 | ||
| 
 | ||
| <p> <font FACE="Arial" SIZE="1"></p>
 | ||
| 
 | ||
| <p> </font><b><font FACE="Arial Narrow"></p>
 | ||
| 
 | ||
| <p>See Also</font><font FACE="Arial" SIZE="2"><u></p>
 | ||
| 
 | ||
| <p>IWbemContext::BeginEnumeration</u></font></b><font FACE="Arial" SIZE="2"
 | ||
| COLOR="#800000">_hmm_IWbemContext_BeginEnumeration</font><font FACE="Arial" SIZE="2">, <u><b>IWbemContext::EndEnumeration</b></u></font><font
 | ||
| FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemContext_EndEnumeration</font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000"></p>
 | ||
| 
 | ||
| <p>‹^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000">›</font><b><font FACE="Arial Narrow"
 | ||
| SIZE="5">IWbemContext::EndEnumeration</font><font FACE="Arial Narrow" SIZE="1"
 | ||
| COLOR="#800000"><EFBFBD>@<40></font></b><font SIZE="2" COLOR="#ff00ff"></p>
 | ||
| 
 | ||
| <p><span style=color:#FF0000></font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
 | ||
| is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff"></span></font><font
 | ||
| FACE="Arial" SIZE="2"> </p>
 | ||
| 
 | ||
| <p>The <b>IWbemContext::EndEnumeration</b> method ends an enumeration sequence that begins
 | ||
| with <u><b>IWbemContext::BeginEnumeration</b></u></font><font FACE="Arial" SIZE="2"
 | ||
| COLOR="#800000">_hmm_IWbemContext_BeginEnumeration</font><font FACE="Arial" SIZE="2">.
 | ||
| This call is not required, but it releases as early as possible any system resources
 | ||
| associated with the enumeration.</font><b><font FACE="Lucida Sans Typewriter" SIZE="2"></p>
 | ||
| 
 | ||
| <p>HRESULT EndEnumeration( );</p>
 | ||
| 
 | ||
| <p></font><font FACE="Arial Narrow"> </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></p>
 | ||
| 
 | ||
| <table CELLSPACING="0" BORDER="0" WIDTH="463">
 | ||
|   <tr>
 | ||
|     <td WIDTH="39%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_S_NO_ERROR</font></td>
 | ||
|     <td WIDTH="61%" VALIGN="TOP"><font FACE="Arial" SIZE="2">The call succeeded.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="39%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_UNEXPECTED</font></td>
 | ||
|     <td WIDTH="61%" VALIGN="TOP"><font FACE="Arial" SIZE="2">This call was made without a
 | ||
|     corresponding call to <b>IwbemContext::BeginEnumeration</b>.</font></td>
 | ||
|   </tr>
 | ||
| </table>
 | ||
| 
 | ||
| <p> <font FACE="Arial" SIZE="1"></p>
 | ||
| 
 | ||
| <p> </font><b><font FACE="Arial Narrow"></p>
 | ||
| 
 | ||
| <p>See Also</font><font FACE="Arial" SIZE="2"><u></p>
 | ||
| 
 | ||
| <p>IWbemContext::BeginEnumeration</u></font></b><font FACE="Arial" SIZE="2"
 | ||
| COLOR="#800000">_hmm_IWbemContext_BeginEnumeration</font><font FACE="Arial" SIZE="2">, <u><b>IWbemContext::Next</b></u></font><font
 | ||
| FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemContext_Next</font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000"></p>
 | ||
| 
 | ||
| <p>‹^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000">›</font><b><font FACE="Arial Narrow"
 | ||
| SIZE="5">IWbemContext::SetValue</font><font FACE="Arial Narrow" SIZE="1" COLOR="#800000"><EFBFBD>@<40></font></b><font
 | ||
| SIZE="2" COLOR="#ff00ff"></p>
 | ||
| 
 | ||
| <p><span style=color:#FF0000></font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
 | ||
| is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff"></span></font><font
 | ||
| FACE="Arial" SIZE="2"> </p>
 | ||
| 
 | ||
| <p>The <b>IWbemContext::SetValue</b> method creates or overwrites a named context value.</font><font
 | ||
| FACE="Lucida Sans Typewriter" SIZE="2"><b></p>
 | ||
| 
 | ||
| <p>HRESULT SetValue(</p>
 | ||
| 
 | ||
| <p>[in] BSTR </b><i>strName</i><b>,</b><i> </i><b></p>
 | ||
| 
 | ||
| <p>[in] LONG </b><i>lFlags</i><b>,</p>
 | ||
| 
 | ||
| <p>[in] VARIANT </b><i>*pValue</i><b></p>
 | ||
| 
 | ||
| <p>);</b></p>
 | ||
| 
 | ||
| <p></font><font FACE="Arial Narrow"><b> </p>
 | ||
| 
 | ||
| <p>Parameters</b></font><font FACE="Arial" SIZE="2"><i></p>
 | ||
| 
 | ||
| <p>strName</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </i><p>Cannot be NULL. It is a read-only pointer to a valid BSTR indicating the context
 | ||
|   value name.</p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <i></p>
 | ||
| 
 | ||
| <p>lFlags</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </i><p>Reserved. It must be zero.</p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <i></p>
 | ||
| 
 | ||
| <p>pValue</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </i><p>Must point to a valid <b>VARIANT</b>, which is treated as read-only. The value in
 | ||
|   the <b>VARIANT</b> becomes the named context value. An entire <u><b>IWbemClassObject</b></u></font><font
 | ||
|   FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemClassObject</font><font FACE="Arial"
 | ||
|   SIZE="2"> can be stored as well as a simple value by enclosing it in a <b>VARIANT</b>
 | ||
|   using the VT_UNKNOWN type. The caller must execute <u><b>QueryInterface</b></u></font><font
 | ||
|   FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemClassObject_QueryInterface</font><font
 | ||
|   FACE="Arial" SIZE="2"> on the <b>IWbemClassObject</b>,<i> </i>asking for <b>IID_IUnknown</b>,
 | ||
|   and use the returned pointer in the <b>VARIANT</b>.</p>
 | ||
|   </font><font FACE="Arial" SIZE="1"><p></font> </p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <font FACE="Arial Narrow" SIZE="5" COLOR="#800000"></p>
 | ||
| 
 | ||
| <p>‹^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000">›</font><b><font FACE="Arial Narrow"
 | ||
| SIZE="5">IWbemContext::GetValue</font><font FACE="Arial Narrow" SIZE="1" COLOR="#800000"><EFBFBD>@<40></font></b><font
 | ||
| SIZE="2" COLOR="#ff00ff"></p>
 | ||
| 
 | ||
| <p><span style=color:#FF0000></font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
 | ||
| is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff"></span></font><font
 | ||
| FACE="Arial" SIZE="2"> </p>
 | ||
| 
 | ||
| <p>The <b>IWbemContext::GetValue</b> method is used to retrieve a specific named context
 | ||
| value by name.</font><font FACE="Lucida Sans Typewriter" SIZE="2"><b></p>
 | ||
| 
 | ||
| <p>HRESULT GetValue(</p>
 | ||
| 
 | ||
| <p>[in] BSTR</b><i> strName</i><b>,</p>
 | ||
| 
 | ||
| <p>[in] LONG </b><i>lFlags</i><b>,</p>
 | ||
| 
 | ||
| <p>[out] VARIANT</b><i> *pValue </i><b></p>
 | ||
| 
 | ||
| <p>);</b></p>
 | ||
| 
 | ||
| <p></font><font FACE="Arial Narrow"><b> </p>
 | ||
| 
 | ||
| <p>Parameters</b></font><font FACE="Arial" SIZE="2"><i></p>
 | ||
| 
 | ||
| <p>strName</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </i><p>The name for which the value is to be retrieved. This must point to a valid BSTR.
 | ||
|   The pointer is treated as read-only.</p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <i></p>
 | ||
| 
 | ||
| <p>lFlags</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </i><p>Reserved. It must be zero.</p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <i></p>
 | ||
| 
 | ||
| <p>pValue</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </i><p>This parameter cannot be NULL and must point to an uninitialized <b>VARIANT</b>. If
 | ||
|   no error is returned, the <b>VARIANT</b> is initialized using <b>VariantInit</b>, and then
 | ||
|   set to contain the context value. The caller must call <b>VariantClear</b> on this pointer
 | ||
|   when the value is no longer required. If an error code is returned, the <b>VARIANT</b>
 | ||
|   pointed to by <i>pValue </i>is left unmodified.</p>
 | ||
|   <p>It is possible that an entire <u><b>IWbemClassObject</b></u></font><font FACE="Arial"
 | ||
|   SIZE="2" COLOR="#800000">_hmm_IWbemClassObject</font><font FACE="Arial" SIZE="2"> can be
 | ||
|   returned inside the <b>VARIANT</b>. If that is the case, then VT_UNKNOWN is the <b>VARIANT</b>
 | ||
|   type. The caller can take the <b>IUnknown</b><i> </i>pointer and execute <b>QueryInterface</b><i>
 | ||
|   </i>to obtain the <b>IWbemClassObject</b><i> </i>pointer.</p>
 | ||
|   </font><font FACE="Arial" SIZE="1"><p></font> </p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <font FACE="Arial Narrow"><b></p>
 | ||
| 
 | ||
| <p>Return Values</b></font></p>
 | ||
| 
 | ||
| <table CELLSPACING="0" BORDER="0" WIDTH="464">
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_NOT_FOUND</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">The requested value was not
 | ||
|     found.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_INVALID_PARAMETER</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">An invalid parameter was
 | ||
|     specified.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_OUT_OF_MEMORY</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">There was not enough memory to
 | ||
|     complete the operation.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_S_NO_ERROR</font></td>
 | ||
|     <td WIDTH="50%" VALIGN="TOP"><font FACE="Arial" SIZE="2">The call succeeded.</font></td>
 | ||
|   </tr>
 | ||
| </table>
 | ||
| 
 | ||
| <p> <font FACE="Arial" SIZE="1"></p>
 | ||
| 
 | ||
| <p> </font><b><font FACE="Arial Narrow"></p>
 | ||
| 
 | ||
| <p>See Also</font><font FACE="Arial" SIZE="2"><u></p>
 | ||
| 
 | ||
| <p>IWbemContext::SetValue</u></font></b><font FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemContext_SetValue</font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000"></p>
 | ||
| 
 | ||
| <p>‹^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000">›</font><b><font FACE="Arial Narrow"
 | ||
| SIZE="5">IWbemContext::DeleteValue</font><font FACE="Arial Narrow" SIZE="1"
 | ||
| COLOR="#800000"><EFBFBD>@<40></font></b><font SIZE="2" COLOR="#ff00ff"></p>
 | ||
| 
 | ||
| <p><span style=color:#FF0000></font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
 | ||
| is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff"></span></font><font
 | ||
| FACE="Arial" SIZE="2"> </p>
 | ||
| 
 | ||
| <p>The <b>IWbemContext::DeleteValue</b> method deletes a named context value created by <b>IWbemContext::SetValue</b>.</font><font
 | ||
| FACE="Lucida Sans Typewriter" SIZE="2"><b></p>
 | ||
| 
 | ||
| <p>HRESULT DeleteValue(</p>
 | ||
| 
 | ||
| <p>[in] BSTR</b><i> strName</i><b>,</p>
 | ||
| 
 | ||
| <p>[in] LONG </b><i>lFlags</i><b></p>
 | ||
| 
 | ||
| <p>);</b></p>
 | ||
| 
 | ||
| <p></font><font FACE="Arial Narrow"><b> </p>
 | ||
| 
 | ||
| <p>Parameters</b></font><font FACE="Arial" SIZE="2"><i></p>
 | ||
| 
 | ||
| <p>strName</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </i><p>A pointer to a valid BSTR containing the named context value to delete. The pointer
 | ||
|   is treated as read-only.</p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <i></p>
 | ||
| 
 | ||
| <p>lFlags</p>
 | ||
| 
 | ||
| <blockquote>
 | ||
|   </i><p>Reserved. It must be zero.</p>
 | ||
|   </font><font FACE="Arial" SIZE="1"><p></font> </p>
 | ||
| </blockquote>
 | ||
| 
 | ||
| <p> <font FACE="Arial Narrow"><b></p>
 | ||
| 
 | ||
| <p>Return Values</b></font></p>
 | ||
| 
 | ||
| <table CELLSPACING="0" BORDER="0" WIDTH="463">
 | ||
|   <tr>
 | ||
|     <td WIDTH="49%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_FAILED</font></td>
 | ||
|     <td WIDTH="51%" VALIGN="TOP"><font FACE="Arial" SIZE="2">There has been a general failure.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="49%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_INVALID_PARAMETER</font></td>
 | ||
|     <td WIDTH="51%" VALIGN="TOP"><font FACE="Arial" SIZE="2">An invalid <i>Name</i> or <i>lFlags
 | ||
|     </i>value was specified.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="49%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_NOT_FOUND</font></td>
 | ||
|     <td WIDTH="51%" VALIGN="TOP"><font FACE="Arial" SIZE="2">The specified named context value
 | ||
|     does not exist.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="49%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_S_NO_ERROR</font></td>
 | ||
|     <td WIDTH="51%" VALIGN="TOP"><font FACE="Arial" SIZE="2">The call succeeded.</font></td>
 | ||
|   </tr>
 | ||
| </table>
 | ||
| 
 | ||
| <p> <font FACE="Arial" SIZE="1"></p>
 | ||
| 
 | ||
| <p> </font><b><font FACE="Arial Narrow"></p>
 | ||
| 
 | ||
| <p>See Also</font><font FACE="Arial" SIZE="2"><u></p>
 | ||
| 
 | ||
| <p>IWbemContext::SetValue</u></font></b><font FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemContext_SetValue</font><font
 | ||
| FACE="Arial" SIZE="2">, <u><b>IWbemContext::GetValue</b></u></font><font FACE="Arial"
 | ||
| SIZE="2" COLOR="#800000">_hmm_IWbemContext_GetValue</font><font FACE="Arial Narrow"
 | ||
| SIZE="5" COLOR="#800000"></p>
 | ||
| 
 | ||
| <p>‹^</font><font FACE="Arial Narrow" SIZE="5"><b># $ K + </b></font><font
 | ||
| FACE="Arial Narrow" SIZE="5" COLOR="#800000">›</font><b><font FACE="Arial Narrow"
 | ||
| SIZE="5">IWbemContext::DeleteAll</font><font FACE="Arial Narrow" SIZE="1" COLOR="#800000"><EFBFBD>@<40></font></b><font
 | ||
| SIZE="2" COLOR="#ff00ff"></p>
 | ||
| 
 | ||
| <p><span style=color:#FF0000></font><font FACE="Arial" SIZE="2" COLOR="#ff0000">[This
 | ||
| is preliminary documentation and subject to change.]</font><font SIZE="2" COLOR="#ff00ff"></span></font><font
 | ||
| FACE="Arial" SIZE="2"> </p>
 | ||
| 
 | ||
| <p>The <b>IWbemContext::DeleteAll</b> method removes all named context values from the
 | ||
| current object, thus emptying the object.</font><b><font FACE="Lucida Sans Typewriter"
 | ||
| SIZE="2"></p>
 | ||
| 
 | ||
| <p>HRESULT DeleteAll( );</p>
 | ||
| 
 | ||
| <p></font><font FACE="Arial Narrow"> </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></p>
 | ||
| 
 | ||
| <table CELLSPACING="0" BORDER="0" WIDTH="463">
 | ||
|   <tr>
 | ||
|     <td WIDTH="53%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_E_FAILED</font></td>
 | ||
|     <td WIDTH="47%" VALIGN="TOP"><font FACE="Arial" SIZE="2">There has been a general failure.</font></td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td WIDTH="53%" VALIGN="TOP"><font FACE="Arial" SIZE="2">WBEM_S_NO_ERROR</font></td>
 | ||
|     <td WIDTH="47%" VALIGN="TOP"><font FACE="Arial" SIZE="2">The call succeeded.</font></td>
 | ||
|   </tr>
 | ||
| </table>
 | ||
| 
 | ||
| <p> <font FACE="Arial" SIZE="1"></p>
 | ||
| 
 | ||
| <p> </font><b><font FACE="Arial Narrow"></p>
 | ||
| 
 | ||
| <p>See Also</font><font FACE="Arial" SIZE="2"><u></p>
 | ||
| 
 | ||
| <p>IWbemContext::DeleteValue</u></font></b><font FACE="Arial" SIZE="2" COLOR="#800000">_hmm_IWbemContext_DeleteValue</font></p>
 | ||
| </body>
 | ||
| </html>
 |