C# .Connect(path) 0x80020009 Error
Hello,
I am creating a c# program to create users and add them to post offices. I've referenced the AdminTypeLibrary but whenever I try to use .connect(path) it throws the error "HResult: 0x80020009(DISP_E_Expection)"
I'm running it on a computer which has Groupwise 7.0.1 and Novell Client 4.91.4. The operating system is windows.
using AdminTypeLibrary;
using GroupwareTypeLibrary;
using NWSessLib;
...........
//variables
object objAdminSystem2;
AdminTypeLibrary.System objAdminSystem;
AdminTypeLibrary.Domain mySelDomain;
....
AdminTypeLibrary.Domains myDomains;
AdminTypeLibrary.Domain myDomain;
string treeName;
//try to connect
NWSess loNWSess = new NWSess();
loNWSess.Bindery = true;
loNWSess.RunScripts = false;
loNWSess.DisplayResults = false;
treeName = loNWSess.DefaultFullName.ToString();
lstStatus.Items.Add(treeName);
loNWSess.Login(treeName, "Admin", "Password", true);
objAdminSystem2 = Activator.CreateInstance(Type.GetTypeFromProgID("N ovellGroupWareAdmin"));
objAdminSystem = new AdminTypeLibrary.System();
AdminTypeLibrary.IADSystem gwSystemInterface = (AdminTypeLibrary.IADSystem)objAdminSystem;
try
{
gwSystemInterface.Connect(txtGWPath);
}
catch (Exception e)
{
lstStatus.HorizontalScrollbar = true;
lstStatus.Items.Add(@"Tried to connect to " + txtGWPath + " but failed " + e.Message.ToString());
}
Any help would be greatly appreciated.
|