The IWHSInfo interface defines a number of methods and properties that you can use to manipulate Windows Home Server objects in code. Although you can create your own class that implements the IWHSInfo interface, the WHSInfoClass already implements IWHSInfo with all of its methods and properties. For most of your development needs, you should use WHSInfoClass to manipulate Windows Home Server objects.
Using the WHSInfoClass
To access most Windows Home Server objects, you need to create an instance of WHSInfoClass. Creating an instance of this class is straightforward, as the following example illustrates:
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.HomeServer.SDK.Interop.v1;
namespace WindowsHomeServer
{
class Program
{
static void Main(string[] args)
{
WHSInfoClass pInfo = new WHSInfoClass();
}
}
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.HomeServer.SDK.Interop.v1
Module Module1
Sub Main()
Dim pInfo As WHSInfoClass = New WHSInfoClass()
End Sub
End Module
After you have an instance of WHSInfoClass, you can use its methods to manipulate other objects that are exposed by the Windows Home Server API.
See Also