Package jnr.ffi.byref

Examples of jnr.ffi.byref.IntByReference.intValue()


             try {
                           IntByReference status = new IntByReference(0);
                 if(kernel32().GetExitCodeProcess(ptr, status) == 0) {
                    throw runtime.newErrnoEPERMError("unable to call GetExitCodeProcess " + pid);
                 } else {
                     if(status.intValue() != STILL_ACTIVE) {
                     throw runtime.newErrnoEPERMError("Process exists but is not alive anymore " + pid);
                               }
                 }
             } finally {
               kernel32().CloseHandle(ptr);
View Full Code Here


              try {
                            IntByReference status = new IntByReference(0);
                  if(kernel32().GetExitCodeProcess(ptr, status) == 0) {
                      throw runtime.newErrnoEPERMError("unable to call GetExitCodeProcess " + pid); // todo better error messages
                  } else {
                      if (status.intValue() == STILL_ACTIVE) {
                        if (kernel32().TerminateProcess(ptr, 0) == 0) {
                           throw runtime.newErrnoEPERMError("unable to call TerminateProcess " + pid);
                         }
                                     // success                  
                    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.