Core Schema

The Core Schema consists of the IANet_NetService class.

Schema Diagram

IANet_NetService

Purpose

The IANet_NetService class is the root object from the IANet_ schema. This class enables the client to access the session that is required to perform sets.

Instances

There is one instance of this object. The client should not rely on the key used for this class. Instead, the client should get the instance of the class by enumerating all instances of IANet_NetService.

Creating Instances

The user is not able to create instances of IANet_NetService.

Removing Instances

The user is not able to delete the instance of IANet_NetService.

Local Properties

This class implements the following local attribute:

Modifiable Properties

There are no user modifiable properties of this class.

Methods

The following methods are implemented in IANet_NetService:

void BeginApply
([OUT] uint32 ClientSetHandle)
Used to set a Client session handle , which should be placed in the context object in the ClientSetId qualifier.
void Apply
([IN] uint32 ClientSetHandle, [OUT] uint32 FollowupAction);
Applies changes made with a particular session handle and releases a session handle after it has been used. The uint32 argument returned is used by the Provider to tell the application the server must be rebooted before the changes will take effect. (this can be accomplished by calling the Reboot method on the class Win32_OperatingSystem).

Values:
1 – system reboot required
0 – no reboot required

Use Cases

A session handle is required to change the configuration. The session handle allows the NCS2 software to manage single access to the configuration, thereby preventing multiple changes to the configuration 

Getting a Client Handle

The client must get the object path of the single instance of  IANet_NetService before accessing the client handle. Call IWbemServices::CreateInstanceEnum and pass the name of the class: IANet_NetService. (this is equivalent to calling IWbemServices::ExecQuery with the query “SELECT * FROM IANet_NetService).

Before making any changes to the configuration, the client must get a client handle. Use the BeginApply method to start a fresh client change configuration. The client can use IWbemServices::ExecMethod to execute a method on a CIM object and will need the object path, from  __PATH attribute of the instance of IANet_NetService.

Using a Client Handle in the IWbemContextOobject

After the client obtains a client handle, it must create an IWbemContext object. Store the client handle in the ClientSetId qualifier of this object. A pointer to this COM object should be passed to every call into IWbemServices. The client handle is not required when making calls to access the IANet_NetService object as this takes the handle as an explicit argument.

Finishing with a Client Handle

After changing the configuration, call the Apply method to commit the changes. This may return a follow-up action code (e.g., reboot the system before the changes can take effect).

Home


Copyright© 2004 Intel Corporation. Legal Information