Click here to Skip to main content
16,017,986 members
Home / Discussions / C#
   

C#

 
AnswerRe: multi threaded tcp listeners possible Pin
harold aptroot6-Mar-09 7:48
harold aptroot6-Mar-09 7:48 
GeneralRe: multi threaded tcp listeners possible Pin
Mubeen.asim6-Mar-09 8:00
Mubeen.asim6-Mar-09 8:00 
GeneralRe: multi threaded tcp listeners possible Pin
harold aptroot6-Mar-09 8:47
harold aptroot6-Mar-09 8:47 
GeneralRe: multi threaded tcp listeners possible Pin
caix7-Mar-09 16:08
caix7-Mar-09 16:08 
GeneralRe: multi threaded tcp listeners possible Pin
mcldev10-Mar-09 10:45
mcldev10-Mar-09 10:45 
GeneralRe: multi threaded tcp listeners possible Pin
Mubeen.asim10-Mar-09 21:21
Mubeen.asim10-Mar-09 21:21 
AnswerRe: multi threaded tcp listeners possible Pin
Ennis Ray Lynch, Jr.6-Mar-09 17:14
Ennis Ray Lynch, Jr.6-Mar-09 17:14 
QuestionWin32_CompurterSystem: Rename, JoinDomainOrWorkgroup, UnjoinDomainOrWorkgroup - HELP Pin
mcldev6-Mar-09 5:18
mcldev6-Mar-09 5:18 
In C#, using WMI has been great for access SI data. For reasons still unbeknownst to me, I cannot get a ManagementBaseObject instance (lets's call it mob) to properly invoke any of these function using InvokeMethod.

For example:

mof = "Rename";
name = "NEWNAME";
password = "adminpw";
user = "administrator";

object[] args = new args[3];
args[0] = name;
args[1] = password;
args[1] = user;

ManagementBaseObject mob = new ManagementBaseObject();
long retval = (long) mob.InvokeMethod(mof, name, password, user);

if (retval == 0)
   Console.Writeline("Reboot PC for RENAME to take effect");
else
   Console.Writeline("RENAME error {0}");


Everytime I get Invalid Method Parameter(s) message.


If anyone knows how to succcessfully call Rename, JoinDomainOrWorkgroup, etc from C#, please share the technique.

Thanks
AnswerRe: Win32_CompurterSystem: Rename, JoinDomainOrWorkgroup, UnjoinDomainOrWorkgroup - HELP Pin
Uros Calakovic6-Mar-09 10:09
Uros Calakovic6-Mar-09 10:09 
GeneralRe: Win32_CompurterSystem: Rename, JoinDomainOrWorkgroup, UnjoinDomainOrWorkgroup - HELP Pin
mcldev6-Mar-09 15:41
mcldev6-Mar-09 15:41 
GeneralRe: Win32_CompurterSystem: Rename, JoinDomainOrWorkgroup, UnjoinDomainOrWorkgroup - HELP Pin
Uros Calakovic6-Mar-09 21:06
Uros Calakovic6-Mar-09 21:06 
GeneralRe: Win32_CompurterSystem: Rename, JoinDomainOrWorkgroup, UnjoinDomainOrWorkgroup - HELP Pin
mcldev10-Mar-09 10:46
mcldev10-Mar-09 10:46 
Questionproblems with my C# application Pin
laziale6-Mar-09 4:26
laziale6-Mar-09 4:26 
AnswerRe: problems with my C# application Pin
musefan6-Mar-09 4:31
musefan6-Mar-09 4:31 
GeneralRe: problems with my C# application Pin
laziale6-Mar-09 4:47
laziale6-Mar-09 4:47 
GeneralRe: problems with my C# application Pin
musefan6-Mar-09 4:55
musefan6-Mar-09 4:55 
GeneralRe: problems with my C# application Pin
laziale6-Mar-09 5:25
laziale6-Mar-09 5:25 
GeneralRe: problems with my C# application Pin
musefan6-Mar-09 5:30
musefan6-Mar-09 5:30 
GeneralRe: problems with my C# application Pin
laziale6-Mar-09 5:53
laziale6-Mar-09 5:53 
GeneralRe: problems with my C# application Pin
musefan6-Mar-09 6:00
musefan6-Mar-09 6:00 
GeneralRe: problems with my C# application Pin
Eddy Vluggen6-Mar-09 6:15
professionalEddy Vluggen6-Mar-09 6:15 
GeneralRe: problems with my C# application Pin
laziale6-Mar-09 6:44
laziale6-Mar-09 6:44 
GeneralRe: problems with my C# application Pin
Eddy Vluggen6-Mar-09 7:04
professionalEddy Vluggen6-Mar-09 7:04 
GeneralRe: problems with my C# application Pin
jaypatel5128-Mar-09 4:46
jaypatel5128-Mar-09 4:46 
QuestionCreating new object in another thread, then BeginInvoke that object? Pin
Matthew Klein6-Mar-09 4:13
Matthew Klein6-Mar-09 4:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.