Hi,
I didn't find old code but luckily I've managed to recreate some simple operations. First of all program is based on "COMCfgMgr 1.4.1 Type Library" which is instaled with wizards ( by default in \Program Files\Common Files\GCTI\CFG Wizards y.x ).
All samples are C# because I don't have VB6 installed but it should be fairly easy to convert them to VB
1) Changing password
[code]
{
COMCFGMGRLib.COMCfgManagerClass server = new COMCFGMGRLib.COMCfgManagerClass();
server.Connect("server", "port", COMCFGMGRLib._CfgAppType.CFGSCE, "default", "user", "password");
// this line is need if You don't want to use standard genesys window for changing password
server.UseGUIElements = 0;
server.ChangePassword("old password", "new password");
server.Disconnect();
}
[/code]
2) Finding some object
[code]
{ COMCFGMGRLib.COMCfgManagerClass server = new COMCFGMGRLib.COMCfgManagerClass();
server.Connect("server", "port", COMCFGMGRLib._CfgAppType.CFGSCE, "default", "user", "password");
COMCFGMGRLib.ICfgQuery query = server.CreateQuery();
// what we want to find
query.ObjectType = COMCFGMGRLib.enum_COMCfgObjectType.COMCFGApplication;
// some filters to narrow search
object value;
// we will be searching for all OCS servers
value = ( object )COMCFGMGRLib._CfgAppType.CFGCMServer;
query.AddFilterValue(COMCFGMGRLib._CfgFilterType.FILTER_APP_TYPE , ref value);
// 1,0 - wait for query to finish for infinity
query.Execute(1, 0);
if (query.Count > 0) {
// we found something
// result is 1 based array
for (int i = 1; i <= query.Count ;i++) {
COMCFGMGRLib.ICfgObject foundObject = (COMCFGMGRLib.ICfgObject)query[i];
Console.WriteLine(" Object :{0} dbid = {1} ", foundObject.Name, foundObject.DBID);
}
}
server.Disconnect();
}
[/code]
I will post soon some other samples for changing data.
Victor - as for changing object - this api is internaly used by all wizards so it must be able to change data in configserver
Paul