[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

hi: "Urgent"how to get namespace using Microsoft.Virtualserver.Interop

neelakanteswararao

10/22/2007 1:23:00 PM

i have written a program to maintain virtual hard disks as following:
using Microsoft.VirtualServer.Interop;
namespace VirtualServerSampleCode_CSharp
{
namespace ScriptingVirtualServer
{
public class Listing_07_03
{
public static string MaintainVHD()
{
string VHDFilename = @"C:\VirtualServer\VHD\NewHardDisk.vhd";
VMVirtualServer objVirtualServer = new VMVirtualServer();
//Create a new dynamically-expanding VHD
objVirtualServer.CreateDynamicVirtualHardDisk(VHDFilename,500);
System.Threading.Thread.Sleep(10000); //Pause for VHD creation
//Compact the new VHD
VMHardDisk objHardDisk = objVirtualServer.GetHardDisk(VHDFilename);
objHardDisk.Compact();
//Convert the new VHD to a fixed-size VHD
objHardDisk.Convert(@"C:\VirtualServer\VHD\FixedSizeDisk.vhd",
VMHardDiskType.vmDiskType_FixedSize);
return "Operation complete.";
}
}
}
}

But it gives error i.e " the type or namespace 'virtualserver' does not
exist in the namespace'Microsoft'(are u missing any assebly)"...
Plz provide me solution..