Click here to Skip to main content
15,881,852 members
Home / Discussions / C#
   

C#

 
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 
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 
Win32_ComputerSystem.Rename is an instance method so you first need to get the Win32_ComputerSystem instance to invoke it on:


ManagementClass computerSystemClass =
   new ManagementClass("Win32_ComputerSystem");

object[] methodArgs = { name, password, user };

foreach (ManagementObject computerSystem in computerSystemClass.GetInstances())
{
   object retval = computerSystem.InvokeMethod(mofName, methodArgs);
}


computerSystemClass.GetInstances() will return only one instance but you still need to use foreach. To avoid it, you could use the ManagementObject constructor that accepts the object path to get the instance:

ManagementObject computerSystem =
    new ManagementObject("Win32_ComputerSystem.Name='SomeName'");


but you would have to get the computer name that you want to change first.

In January you said "Money in April" -
That was two years ago!

B. Python

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 
AnswerRe: Creating new object in another thread, then BeginInvoke that object? Pin
Curtis Schlak.6-Mar-09 4:20
Curtis Schlak.6-Mar-09 4:20 
GeneralRe: Creating new object in another thread, then BeginInvoke that object? Pin
Matthew Klein6-Mar-09 5:55
Matthew Klein6-Mar-09 5:55 
GeneralRe: Creating new object in another thread, then BeginInvoke that object? Pin
Curtis Schlak.6-Mar-09 6:59
Curtis Schlak.6-Mar-09 6:59 

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.