예제 #1
0
    public bool SetStatic(string ip, string netmask)
    {
        int retVal = WMIMethod.ExecuteMethod(this, new { IPAddress = new string[] { ip }, SubnetMask = new string[] { netmask } });

        if (retVal != 0)
        {
            Console.WriteLine($"Failed to set network settings with error code {retVal}");
        }
        return(retVal == 0);
    }
예제 #2
0
파일: Process.cs 프로젝트: nicoriff/ORMi
        public ProcessResult Create(string commandLine, string currentDirectory, string processStartupInformation)
        {
            ProcessResult res = WMIMethod.ExecuteStaticMethod <ProcessResult>(new { CommandLine = commandLine, CurrentDirectory = currentDirectory, ProcessStartupInformation = processStartupInformation });

            return(res);
        }
예제 #3
0
파일: Process.cs 프로젝트: nicoriff/ORMi
 public int AttachDebugger()
 {
     return(WMIMethod.ExecuteMethod <int>(this));
 }
예제 #4
0
파일: Process.cs 프로젝트: nicoriff/ORMi
 public ProcessOwner GetOwner()
 {
     return(WMIMethod.ExecuteMethod <ProcessOwner>(this));
 }
예제 #5
0
파일: Process.cs 프로젝트: nicoriff/ORMi
 public dynamic GetOwnerSid()
 {
     return(WMIMethod.ExecuteMethod(this));
 }
예제 #6
0
 public void RenamePrinter(string newName)
 {
     WMIMethod.ExecuteMethod(this, new { NewPrinterName = newName });
 }
예제 #7
0
파일: Output.cs 프로젝트: yesnomore/ORMi
 public dynamic Activate()
 {
     return(WMIMethod.ExecuteMethod(this));
 }