Examples of Kernel32


Examples of com.sun.jna.examples.win32.Kernel32

            int i = 0;
            for (Object[] keys = fileMap.keySet().toArray(); !fileMap.isEmpty();) {
                unwatch((File)keys[i++]);
            }
           
            Kernel32 klib = Kernel32.INSTANCE;
            klib.PostQueuedCompletionStatus(port, 0, null, null);
            klib.CloseHandle(port);
            port = null;
            watcher = null;
        }
View Full Code Here

Examples of com.sun.jna.examples.win32.Kernel32

            klib.CloseHandle(port);
            port = null;
            watcher = null;
        }
        private String getSystemError(int code) {
            Kernel32 lib = Kernel32.INSTANCE;
            PointerByReference pref = new PointerByReference();
            lib.FormatMessage(Kernel32.FORMAT_MESSAGE_ALLOCATE_BUFFER
                              |Kernel32.FORMAT_MESSAGE_FROM_SYSTEM
                              |Kernel32.FORMAT_MESSAGE_IGNORE_INSERTS,
                              null, code,
                              0, pref, 0, null);
            String s = pref.getValue().getString(0, !Boolean.getBoolean("w32.ascii"));
            s = s.replace(".\r",".").replace(".\n",".");
            lib.LocalFree(pref.getValue());
            return s;
        }
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.