Examples of GetLastError()


Examples of com.sun.jna.examples.win32.Kernel32.GetLastError()

           
            if (!klib.ReadDirectoryChangesW(finfo.handle, finfo.info,
                                            finfo.info.size(), finfo.recursive,
                                            finfo.notifyMask, finfo.infoLength,
                                            finfo.overlapped, null)) {
                int err = klib.GetLastError();
                throw new IOException("ReadDirectoryChangesW failed on "
                                      + finfo.file + ": '"
                                      + getSystemError(err)
                                      + "' (" + err + ")");
            }
View Full Code Here

Examples of com.sun.jna.examples.win32.Kernel32.GetLastError()

                                            Kernel32.FILE_LIST_DIRECTORY,
                                            mask, null, Kernel32.OPEN_EXISTING,
                                            flags, null);
            if (Kernel32.INVALID_HANDLE_VALUE.equals(handle)) {
                throw new IOException("Unable to open " + file + " ("
                                      + klib.GetLastError() + ")");
            }
            int notifyMask = convertMask(eventMask);
            FileInfo finfo = new FileInfo(file, handle, notifyMask, recursive);
            fileMap.put(file, finfo);
            handleMap.put(handle, finfo);
View Full Code Here

Examples of com.sun.jna.examples.win32.Kernel32.GetLastError()

            // Existing port is returned
            port = klib.CreateIoCompletionPort(handle, port, handle.getPointer(), 0);
            if (Kernel32.INVALID_HANDLE_VALUE.equals(port)) {
                throw new IOException("Unable to create/use I/O Completion port "
                        + "for " + file + " ("
                        + klib.GetLastError() + ")");
            }
            // TODO: use FileIOCompletionRoutine callback method instead of a
            // dedicated thread
            if (!klib.ReadDirectoryChangesW(handle, finfo.info, finfo.info.size(),
                                            recursive, notifyMask, finfo.infoLength,
View Full Code Here

Examples of com.sun.jna.examples.win32.Kernel32.GetLastError()

            // TODO: use FileIOCompletionRoutine callback method instead of a
            // dedicated thread
            if (!klib.ReadDirectoryChangesW(handle, finfo.info, finfo.info.size(),
                                            recursive, notifyMask, finfo.infoLength,
                                            finfo.overlapped, null)) {
                int err = klib.GetLastError();
                throw new IOException("ReadDirectoryChangesW failed on "
                                      + finfo.file
                                      + ": '" + getSystemError(err)
                                      + "' (" + err + ")");
            }
View Full Code Here

Examples of com.sun.jna.examples.win32.Kernel32.GetLastError()

           
            if (!klib.ReadDirectoryChangesW(finfo.handle, finfo.info,
                                            finfo.info.size(), finfo.recursive,
                                            finfo.notifyMask, finfo.infoLength,
                                            finfo.overlapped, null)) {
                int err = klib.GetLastError();
                throw new IOException("ReadDirectoryChangesW failed on "
                                      + finfo.file + ": '"
                                      + getSystemError(err)
                                      + "' (" + err + ")");
            }
View Full Code Here

Examples of com.sun.jna.examples.win32.Kernel32.GetLastError()

                                            Kernel32.FILE_LIST_DIRECTORY,
                                            mask, null, Kernel32.OPEN_EXISTING,
                                            flags, null);
            if (Kernel32.INVALID_HANDLE_VALUE.equals(handle)) {
                throw new IOException("Unable to open " + file + " ("
                                      + klib.GetLastError() + ")");
            }
            int notifyMask = convertMask(eventMask);
            FileInfo finfo = new FileInfo(file, handle, notifyMask, recursive);
            fileMap.put(file, finfo);
            handleMap.put(handle, finfo);
View Full Code Here

Examples of com.sun.jna.examples.win32.Kernel32.GetLastError()

            // Existing port is returned
            port = klib.CreateIoCompletionPort(handle, port, handle.getPointer(), 0);
            if (Kernel32.INVALID_HANDLE_VALUE.equals(port)) {
                throw new IOException("Unable to create/use I/O Completion port "
                        + "for " + file + " ("
                        + klib.GetLastError() + ")");
            }
            // TODO: use FileIOCompletionRoutine callback method instead of a
            // dedicated thread
            if (!klib.ReadDirectoryChangesW(handle, finfo.info, finfo.info.size(),
                                            recursive, notifyMask, finfo.infoLength,
View Full Code Here

Examples of com.sun.jna.examples.win32.Kernel32.GetLastError()

            // TODO: use FileIOCompletionRoutine callback method instead of a
            // dedicated thread
            if (!klib.ReadDirectoryChangesW(handle, finfo.info, finfo.info.size(),
                                            recursive, notifyMask, finfo.infoLength,
                                            finfo.overlapped, null)) {
                int err = klib.GetLastError();
                throw new IOException("ReadDirectoryChangesW failed on "
                                      + finfo.file + ", handle " + handle
                                      + ": '" + getSystemError(err)
                                      + "' (" + err + ")");
            }
View Full Code Here

Examples of org.apache.activemq.apollo.util.os.CLibrary.GetLastError()

                        fd.sync();
                    }
                    public void hardlink(File source, File target) throws IOException {
                        int rc = lib.CreateHardLink(target.getCanonicalPath(), source.getCanonicalPath(), 0);
                        if( rc == 0 ){
                            throw new IOException("Hard link failed with result code="+lib.GetLastError());
                        }
                    }
                };
            } catch (Throwable ignore) {
                // Perhaps we should issue a warning here so folks know that
View Full Code Here

Examples of org.apache.activemq.apollo.util.os.Kernel32Library.GetLastError()

                        fd.sync();
                    }
                    public void hardlink(File source, File target) throws IOException {
                        int rc = lib.CreateHardLink(target.getCanonicalPath(), source.getCanonicalPath(), 0);
                        if( rc == 0 ){
                            throw new IOException("Hard link failed with result code="+lib.GetLastError());
                        }
                    }
                };
            } catch (Throwable ignore) {
                // Perhaps we should issue a warning here so folks know that
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.