com.sun.jna.examples.win32
Interface Kernel32
- All Superinterfaces:
- AltCallingConvention, Library, StdCall, StdCallLibrary, W32API, W32Errors
public interface Kernel32
- extends W32API
Definition (incomplete) of kernel32.dll
.
Nested classes/interfaces inherited from interface com.sun.jna.examples.win32.W32API |
W32API.DWORD, W32API.HANDLE, W32API.HANDLEByReference, W32API.HBITMAP, W32API.HDC, W32API.HICON, W32API.HINSTANCE, W32API.HMODULE, W32API.HRESULT, W32API.HRGN, W32API.HWND, W32API.LONG, W32API.LONG_PTR, W32API.LPARAM, W32API.LRESULT, W32API.SIZE_T, W32API.SSIZE_T, W32API.UINT_PTR, W32API.ULONG_PTR, W32API.WORD, W32API.WPARAM |
Method Summary |
boolean |
CloseHandle(W32API.HANDLE hObject)
|
boolean |
CreateDirectory()
|
W32API.HANDLE |
CreateFile(String lpFileName,
int dwDesiredAccess,
int dwShareMode,
Kernel32.SECURITY_ATTRIBUTES lpSecurityAttributes,
int dwCreationDisposition,
int dwFlagsAndAttributes,
W32API.HANDLE hTemplateFile)
|
W32API.HANDLE |
CreateIoCompletionPort(W32API.HANDLE FileHandle,
W32API.HANDLE ExistingCompletionPort,
Pointer CompletionKey,
int NumberOfConcurrentThreads)
|
boolean |
DuplicateHandle(W32API.HANDLE hSourceProcessHandle,
W32API.HANDLE hSourceHandle,
W32API.HANDLE hTargetProcessHandle,
W32API.HANDLEByReference lpTargetHandle,
int dwDesiredAccess,
boolean bInheritHandle,
int dwOptions)
|
int |
FormatMessage(int dwFlags,
Pointer lpSource,
int dwMessageId,
int dwLanguageId,
Buffer lpBuffer,
int nSize,
Pointer va_list)
|
int |
FormatMessage(int dwFlags,
Pointer lpSource,
int dwMessageId,
int dwLanguageId,
PointerByReference lpBuffer,
int nSize,
Pointer va_list)
|
W32API.HANDLE |
GetCurrentProcess()
|
int |
GetCurrentProcessId()
|
W32API.HANDLE |
GetCurrentThread()
|
int |
GetCurrentThreadId()
|
int |
GetDriveType(String rootPathName)
|
int |
GetLastError()
|
W32API.HMODULE |
GetModuleHandle(String name)
|
int |
GetProcessId(W32API.HANDLE process)
|
int |
GetProcessVersion(int processId)
|
boolean |
GetQueuedCompletionStatus(W32API.HANDLE CompletionPort,
IntByReference lpNumberOfBytes,
ByReference lpCompletionKey,
PointerByReference lpOverlapped,
int dwMilliseconds)
|
int |
GetShortPathName(String lpszLongPath,
byte[] lpdzShortPath,
int cchBuffer)
ASCII version. |
int |
GetShortPathName(String lpszLongPath,
char[] lpdzShortPath,
int cchBuffer)
Unicode version (the default). |
void |
GetSystemTime(Kernel32.SYSTEMTIME result)
|
Pointer |
GlobalFree(Pointer hGlobal)
|
Pointer |
LocalFree(Pointer hLocal)
|
boolean |
PostQueuedCompletionStatus(W32API.HANDLE CompletionPort,
int dwNumberOfBytesTransferred,
Pointer dwCompletionKey,
Kernel32.OVERLAPPED lpOverlapped)
|
boolean |
ReadDirectoryChangesW(W32API.HANDLE directory,
Kernel32.FILE_NOTIFY_INFORMATION info,
int length,
boolean watchSubtree,
int notifyFilter,
IntByReference bytesReturned,
Kernel32.OVERLAPPED overlapped,
Kernel32.OVERLAPPED_COMPLETION_ROUTINE completionRoutine)
NOTE: only exists in unicode form (W suffix). |
void |
SetLastError(int dwErrCode)
|
int |
WaitForSingleObject(W32API.HANDLE hHandle,
int dwMilliseconds)
|
INSTANCE
static final Kernel32 INSTANCE
FORMAT_MESSAGE_ALLOCATE_BUFFER
static final int FORMAT_MESSAGE_ALLOCATE_BUFFER
- See Also:
- Constant Field Values
FORMAT_MESSAGE_FROM_SYSTEM
static final int FORMAT_MESSAGE_FROM_SYSTEM
- See Also:
- Constant Field Values
FORMAT_MESSAGE_IGNORE_INSERTS
static final int FORMAT_MESSAGE_IGNORE_INSERTS
- See Also:
- Constant Field Values
FILE_LIST_DIRECTORY
static final int FILE_LIST_DIRECTORY
- See Also:
- Constant Field Values
FILE_SHARE_READ
static final int FILE_SHARE_READ
- See Also:
- Constant Field Values
FILE_SHARE_WRITE
static final int FILE_SHARE_WRITE
- See Also:
- Constant Field Values
FILE_SHARE_DELETE
static final int FILE_SHARE_DELETE
- See Also:
- Constant Field Values
CREATE_NEW
static final int CREATE_NEW
- See Also:
- Constant Field Values
CREATE_ALWAYS
static final int CREATE_ALWAYS
- See Also:
- Constant Field Values
OPEN_EXISTING
static final int OPEN_EXISTING
- See Also:
- Constant Field Values
OPEN_ALWAYS
static final int OPEN_ALWAYS
- See Also:
- Constant Field Values
TRUNCATE_EXISTING
static final int TRUNCATE_EXISTING
- See Also:
- Constant Field Values
FILE_FLAG_WRITE_THROUGH
static final int FILE_FLAG_WRITE_THROUGH
- See Also:
- Constant Field Values
FILE_FLAG_OVERLAPPED
static final int FILE_FLAG_OVERLAPPED
- See Also:
- Constant Field Values
FILE_FLAG_NO_BUFFERING
static final int FILE_FLAG_NO_BUFFERING
- See Also:
- Constant Field Values
FILE_FLAG_RANDOM_ACCESS
static final int FILE_FLAG_RANDOM_ACCESS
- See Also:
- Constant Field Values
FILE_FLAG_SEQUENTIAL_SCAN
static final int FILE_FLAG_SEQUENTIAL_SCAN
- See Also:
- Constant Field Values
FILE_FLAG_DELETE_ON_CLOSE
static final int FILE_FLAG_DELETE_ON_CLOSE
- See Also:
- Constant Field Values
FILE_FLAG_BACKUP_SEMANTICS
static final int FILE_FLAG_BACKUP_SEMANTICS
- See Also:
- Constant Field Values
FILE_FLAG_POSIX_SEMANTICS
static final int FILE_FLAG_POSIX_SEMANTICS
- See Also:
- Constant Field Values
FILE_FLAG_OPEN_REPARSE_POINT
static final int FILE_FLAG_OPEN_REPARSE_POINT
- See Also:
- Constant Field Values
FILE_FLAG_OPEN_NO_RECALL
static final int FILE_FLAG_OPEN_NO_RECALL
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_READONLY
static final int FILE_ATTRIBUTE_READONLY
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_HIDDEN
static final int FILE_ATTRIBUTE_HIDDEN
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_SYSTEM
static final int FILE_ATTRIBUTE_SYSTEM
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_DIRECTORY
static final int FILE_ATTRIBUTE_DIRECTORY
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_ARCHIVE
static final int FILE_ATTRIBUTE_ARCHIVE
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_DEVICE
static final int FILE_ATTRIBUTE_DEVICE
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_NORMAL
static final int FILE_ATTRIBUTE_NORMAL
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_TEMPORARY
static final int FILE_ATTRIBUTE_TEMPORARY
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_SPARSE_FILE
static final int FILE_ATTRIBUTE_SPARSE_FILE
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_REPARSE_POINT
static final int FILE_ATTRIBUTE_REPARSE_POINT
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_COMPRESSED
static final int FILE_ATTRIBUTE_COMPRESSED
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_OFFLINE
static final int FILE_ATTRIBUTE_OFFLINE
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
static final int FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_ENCRYPTED
static final int FILE_ATTRIBUTE_ENCRYPTED
- See Also:
- Constant Field Values
DRIVE_UNKNOWN
static final int DRIVE_UNKNOWN
- See Also:
- Constant Field Values
DRIVE_NO_ROOT_DIR
static final int DRIVE_NO_ROOT_DIR
- See Also:
- Constant Field Values
DRIVE_REMOVABLE
static final int DRIVE_REMOVABLE
- See Also:
- Constant Field Values
DRIVE_FIXED
static final int DRIVE_FIXED
- See Also:
- Constant Field Values
DRIVE_REMOTE
static final int DRIVE_REMOTE
- See Also:
- Constant Field Values
DRIVE_CDROM
static final int DRIVE_CDROM
- See Also:
- Constant Field Values
DRIVE_RAMDISK
static final int DRIVE_RAMDISK
- See Also:
- Constant Field Values
GENERIC_WRITE
static final int GENERIC_WRITE
- See Also:
- Constant Field Values
INFINITE
static final int INFINITE
- See Also:
- Constant Field Values
FILE_ACTION_ADDED
static final int FILE_ACTION_ADDED
- See Also:
- Constant Field Values
FILE_ACTION_REMOVED
static final int FILE_ACTION_REMOVED
- See Also:
- Constant Field Values
FILE_ACTION_MODIFIED
static final int FILE_ACTION_MODIFIED
- See Also:
- Constant Field Values
FILE_ACTION_RENAMED_OLD_NAME
static final int FILE_ACTION_RENAMED_OLD_NAME
- See Also:
- Constant Field Values
FILE_ACTION_RENAMED_NEW_NAME
static final int FILE_ACTION_RENAMED_NEW_NAME
- See Also:
- Constant Field Values
FILE_NOTIFY_CHANGE_FILE_NAME
static final int FILE_NOTIFY_CHANGE_FILE_NAME
- See Also:
- Constant Field Values
FILE_NOTIFY_CHANGE_DIR_NAME
static final int FILE_NOTIFY_CHANGE_DIR_NAME
- See Also:
- Constant Field Values
FILE_NOTIFY_CHANGE_NAME
static final int FILE_NOTIFY_CHANGE_NAME
- See Also:
- Constant Field Values
FILE_NOTIFY_CHANGE_ATTRIBUTES
static final int FILE_NOTIFY_CHANGE_ATTRIBUTES
- See Also:
- Constant Field Values
FILE_NOTIFY_CHANGE_SIZE
static final int FILE_NOTIFY_CHANGE_SIZE
- See Also:
- Constant Field Values
FILE_NOTIFY_CHANGE_LAST_WRITE
static final int FILE_NOTIFY_CHANGE_LAST_WRITE
- See Also:
- Constant Field Values
FILE_NOTIFY_CHANGE_LAST_ACCESS
static final int FILE_NOTIFY_CHANGE_LAST_ACCESS
- See Also:
- Constant Field Values
FILE_NOTIFY_CHANGE_CREATION
static final int FILE_NOTIFY_CHANGE_CREATION
- See Also:
- Constant Field Values
FILE_NOTIFY_CHANGE_EA
static final int FILE_NOTIFY_CHANGE_EA
- See Also:
- Constant Field Values
FILE_NOTIFY_CHANGE_SECURITY
static final int FILE_NOTIFY_CHANGE_SECURITY
- See Also:
- Constant Field Values
FILE_NOTIFY_CHANGE_STREAM_NAME
static final int FILE_NOTIFY_CHANGE_STREAM_NAME
- See Also:
- Constant Field Values
FILE_NOTIFY_CHANGE_STREAM_SIZE
static final int FILE_NOTIFY_CHANGE_STREAM_SIZE
- See Also:
- Constant Field Values
FILE_NOTIFY_CHANGE_STREAM_WRITE
static final int FILE_NOTIFY_CHANGE_STREAM_WRITE
- See Also:
- Constant Field Values
LocalFree
Pointer LocalFree(Pointer hLocal)
GlobalFree
Pointer GlobalFree(Pointer hGlobal)
GetModuleHandle
W32API.HMODULE GetModuleHandle(String name)
GetSystemTime
void GetSystemTime(Kernel32.SYSTEMTIME result)
GetCurrentThreadId
int GetCurrentThreadId()
GetCurrentThread
W32API.HANDLE GetCurrentThread()
GetCurrentProcessId
int GetCurrentProcessId()
GetCurrentProcess
W32API.HANDLE GetCurrentProcess()
GetProcessId
int GetProcessId(W32API.HANDLE process)
GetProcessVersion
int GetProcessVersion(int processId)
GetLastError
int GetLastError()
SetLastError
void SetLastError(int dwErrCode)
GetDriveType
int GetDriveType(String rootPathName)
FormatMessage
int FormatMessage(int dwFlags,
Pointer lpSource,
int dwMessageId,
int dwLanguageId,
PointerByReference lpBuffer,
int nSize,
Pointer va_list)
FormatMessage
int FormatMessage(int dwFlags,
Pointer lpSource,
int dwMessageId,
int dwLanguageId,
Buffer lpBuffer,
int nSize,
Pointer va_list)
CreateFile
W32API.HANDLE CreateFile(String lpFileName,
int dwDesiredAccess,
int dwShareMode,
Kernel32.SECURITY_ATTRIBUTES lpSecurityAttributes,
int dwCreationDisposition,
int dwFlagsAndAttributes,
W32API.HANDLE hTemplateFile)
CreateDirectory
boolean CreateDirectory()
CreateIoCompletionPort
W32API.HANDLE CreateIoCompletionPort(W32API.HANDLE FileHandle,
W32API.HANDLE ExistingCompletionPort,
Pointer CompletionKey,
int NumberOfConcurrentThreads)
GetQueuedCompletionStatus
boolean GetQueuedCompletionStatus(W32API.HANDLE CompletionPort,
IntByReference lpNumberOfBytes,
ByReference lpCompletionKey,
PointerByReference lpOverlapped,
int dwMilliseconds)
PostQueuedCompletionStatus
boolean PostQueuedCompletionStatus(W32API.HANDLE CompletionPort,
int dwNumberOfBytesTransferred,
Pointer dwCompletionKey,
Kernel32.OVERLAPPED lpOverlapped)
WaitForSingleObject
int WaitForSingleObject(W32API.HANDLE hHandle,
int dwMilliseconds)
DuplicateHandle
boolean DuplicateHandle(W32API.HANDLE hSourceProcessHandle,
W32API.HANDLE hSourceHandle,
W32API.HANDLE hTargetProcessHandle,
W32API.HANDLEByReference lpTargetHandle,
int dwDesiredAccess,
boolean bInheritHandle,
int dwOptions)
CloseHandle
boolean CloseHandle(W32API.HANDLE hObject)
ReadDirectoryChangesW
boolean ReadDirectoryChangesW(W32API.HANDLE directory,
Kernel32.FILE_NOTIFY_INFORMATION info,
int length,
boolean watchSubtree,
int notifyFilter,
IntByReference bytesReturned,
Kernel32.OVERLAPPED overlapped,
Kernel32.OVERLAPPED_COMPLETION_ROUTINE completionRoutine)
- NOTE: only exists in unicode form (W suffix). Define this method
explicitly with the W suffix to avoid inadvertent calls in ASCII mode.
GetShortPathName
int GetShortPathName(String lpszLongPath,
byte[] lpdzShortPath,
int cchBuffer)
- ASCII version. Use
Native.toString(byte[])
to obtain the short
path from the byte
array.
Use only if w32.ascii==true
.
GetShortPathName
int GetShortPathName(String lpszLongPath,
char[] lpdzShortPath,
int cchBuffer)
- Unicode version (the default). Use
Native.toString(char[])
to
obtain the short path from the char
array.
Copyright © 2007-2009 Timothy Wall. All Rights Reserved.