SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
GetJobList not working in Visual Studio 2005

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
GetJobList not working in Visual Studio 2005
Author Message
whornak



Joined: 21 Aug 2008
Posts: 10
Country: United States

Post GetJobList not working in Visual Studio 2005 Reply with quote
I am trying to execute the GetJobList or GetJobListEx using C# in Visual Studio 2005 to prove that the connection that I have established is truly connected and functional.

I have tried as many ways as I can think of and continue to get the following message:

"No method was found matching the name and argument list."

Below is the code that I am using based on examples found in the documentation.

Type tRemote24x7 = Type.GetTypeFromProgID("24x7 Remote Control");
object oRemote24x7 = Activator.CreateInstance(tRemote24x7);
Object[] oMethodArgs = { sUserName, sPassword, "Winsock", sHost, sPort, "", false };

Object oRtnValue = tRemote24x7.InvokeMember("OpenSession", System.Reflection.BindingFlags.InvokeMethod, null, oRemote24x7, oMethodArgs);

Object[] oJobListArgs = { sWorkString, false, "DISABLED,FOLDER_NAME" };

oRtnValue = tRemote24x7.InvokeMember("GetJobListEx", System.Reflection.BindingFlags.InvokeMethod, null, oRemote24x7, oJobListArgs);

Any help would be very much appreciated.

Thanks in advance.
Fri Sep 05, 2008 2:39 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7949

Post Reply with quote
I'm not C# expert, but I think the parameters specified for GetObjectListEx are incorrect. Note that the first parameter must be passed by reference, and not as a safe array copy.
That's why you get "No method was found matching the name and argument list" message, because method doesn't exit with the parameters that you are trying to pass.


For examples calling COM methods returning parameters ByRef, see http://msdn.microsoft.com/en-us/library/aa332512(VS.71).aspx Lots of examples can be also found on the web.

24x7 Also support a couple of interfaces that do not return values via Parameter references and use COM object instance variable for the returned data. Please see "Supported COM Interfaces" topic in the 24x7 COM Reference for more info.
Sun Sep 07, 2008 1:15 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.