Search this site
Embedded Files
JNIWrapper Support
  • Home
  • Documentation
    • Frequently Asked Questions
      • Gathering Information about Licence Errors
      • General
      • Technical
      • WinPack
    • Installation Instructions
    • Javadoc
    • Logging in JNIWrapper
      • Enabling Log4J in JNIWrapper
    • Mapping Native Types to JNIWrapper Classes
    • Mapping Windows Data Types
    • Programmer's Guide
    • Supported Platforms
    • Troubleshooting
    • Tutorial
  • Samples
    • JNIWrapper Samples
      • Basic JNIWrapper Sample
      • Bit Field Sample
      • Bit Structure
      • Callback Sample
      • Callback with Array Sample
      • Callback with Fill External Array Sample
      • Complex Array Sample
      • External String Pointer Sample
      • Function Call Sample
      • Key Value Structure
      • Linked Structure
      • Linked Structure Sample
      • Modifying the ACLs of an Object using JNIWrapper and WinPack
      • Primitive Array Sample
      • Resizing Pointer Sample
      • Sample Structure
      • String Array Sample
      • Structure Sample
      • Union Sample
      • Union Structure
      • Variable Sample
    • WinPack Samples
      • Access Services Remote Computer
      • Active Directory API Sample
      • Buzzer
      • Call Window Proc Sample
      • CBT Hook Sample
      • Check Admin Rights Sample
      • Choose Color Dialog Sample
      • Clipboard Viewer Sample
      • Custom Shape Window Sample
      • DDE Client Sample
      • DDE Service Sample
      • Enum Printers Sample
      • Enum Processes Sample
      • Enum Token Groups
      • Event Log Sample
      • File System Sample
      • File System Watcher Sample
      • Get Application Windows Sample
      • Get Computer Name Example
      • Hook Sample
      • Idle Tracker Sample
      • Java Taskbar Caption Sample
      • Journal Hook Sample
      • Low Level Keyboard Hook Sample
      • Low Level Mouse Hook Sample
      • Mixer Helper
      • Open/Save File Dialog Sample
      • Raw Keyboard Input Sample
      • Redirect STD Streams Example
      • Registry Key Enum Values Sample
      • Registry Key Set Values Sample
      • Sample Tray App
      • Select Folder Dialog Sample
      • ShellExecuteExExample
      • Win Event Hook Sample
      • Win Http Sample
      • Wnd Sample
      • WNetAddConnection2Sample
  • Release Notes
    • JNIWrapper 1.0 Release Notes
    • JNIWrapper 1.1 Release Notes
    • JNIWrapper 1.2 Release Notes
    • JNIWrapper 1.3 Release Notes
    • JNIWrapper 2.0 for Windows Release Notes
    • JNIWrapper 2.1. for Windows Release Notes
    • JNIWrapper 2.2 for WIndows Release Notes
    • JNIWrapper 2.3 for WIndows Release Notes
    • JNIWrapper 2.4 for Windows
    • JNIWrapper 2.4.1 for WIndows Release Notes
    • JNIWrapper 2.5 Beta for Windows Release Notes
    • JNIWrapper 2.5 for WIndows Release Notes
    • JNIWrapper 2.6 for Windows Release Notes
    • JNIWrapper 2.7 for Windows Release Notes
    • JNIWrapper 2.7.1 for Windows Release Notes
    • JNIWrapper 2.8 for Windows Release Notes
    • JNIWrapper 2.8.5 for Windows Release Notes
    • JNIWrapper 2.9 for Windows Release Notes
    • JNIWrapper 2.9.5 for Windows Release Notes
    • JNIWrapper 3.0 Release Notes
    • JNIWrapper 3.1 Release Notes
    • JNIWrapper 3.10 Release Notes
    • JNIWrapper 3.11 Release Notes
    • JNIWrapper 3.12 Release Notes
    • JNIWrapper 3.2 Release Notes
    • JNIWrapper 3.3 Release Notes
    • JNIWrapper 3.4 Release Notes
    • JNIWrapper 3.5 Release Notes
    • JNIWrapper 3.6 Release Notes
    • JNIWrapper 3.6.1 Release Notes
    • JNIWrapper 3.7 Release Notes
    • JNIWrapper 3.7.1 Release Notes
    • JNIWrapper 3.7.2 Release Notes
    • JNIWrapper 3.7.3 Release Notes
    • JNIWrapper 3.8 Release Notes
    • JNIWrapper 3.8.1 Release Notes
    • JNIWrapper 3.8.2 Release Notes
    • JNIWrapper 3.8.3 Release Notes
    • JNIWrapper 3.8.4 Release Notes
    • JNIWrapper 3.9 Release Notes
    • JNIWrapper for IBM AIX Release Notes
    • JNIWrapper for Linux 1.0 Release Notes
    • JNIWrapper for Solaris UltraSPARC
    • JNIWrapper for Windows & Linux version 1.4 Release Notes
    • JNIWrapper for Windows version 1.3.1 Release Notes
    • JNIWrapper 3.13 Release Notes
JNIWrapper Support
  • Home
  • Documentation
    • Frequently Asked Questions
      • Gathering Information about Licence Errors
      • General
      • Technical
      • WinPack
    • Installation Instructions
    • Javadoc
    • Logging in JNIWrapper
      • Enabling Log4J in JNIWrapper
    • Mapping Native Types to JNIWrapper Classes
    • Mapping Windows Data Types
    • Programmer's Guide
    • Supported Platforms
    • Troubleshooting
    • Tutorial
  • Samples
    • JNIWrapper Samples
      • Basic JNIWrapper Sample
      • Bit Field Sample
      • Bit Structure
      • Callback Sample
      • Callback with Array Sample
      • Callback with Fill External Array Sample
      • Complex Array Sample
      • External String Pointer Sample
      • Function Call Sample
      • Key Value Structure
      • Linked Structure
      • Linked Structure Sample
      • Modifying the ACLs of an Object using JNIWrapper and WinPack
      • Primitive Array Sample
      • Resizing Pointer Sample
      • Sample Structure
      • String Array Sample
      • Structure Sample
      • Union Sample
      • Union Structure
      • Variable Sample
    • WinPack Samples
      • Access Services Remote Computer
      • Active Directory API Sample
      • Buzzer
      • Call Window Proc Sample
      • CBT Hook Sample
      • Check Admin Rights Sample
      • Choose Color Dialog Sample
      • Clipboard Viewer Sample
      • Custom Shape Window Sample
      • DDE Client Sample
      • DDE Service Sample
      • Enum Printers Sample
      • Enum Processes Sample
      • Enum Token Groups
      • Event Log Sample
      • File System Sample
      • File System Watcher Sample
      • Get Application Windows Sample
      • Get Computer Name Example
      • Hook Sample
      • Idle Tracker Sample
      • Java Taskbar Caption Sample
      • Journal Hook Sample
      • Low Level Keyboard Hook Sample
      • Low Level Mouse Hook Sample
      • Mixer Helper
      • Open/Save File Dialog Sample
      • Raw Keyboard Input Sample
      • Redirect STD Streams Example
      • Registry Key Enum Values Sample
      • Registry Key Set Values Sample
      • Sample Tray App
      • Select Folder Dialog Sample
      • ShellExecuteExExample
      • Win Event Hook Sample
      • Win Http Sample
      • Wnd Sample
      • WNetAddConnection2Sample
  • Release Notes
    • JNIWrapper 1.0 Release Notes
    • JNIWrapper 1.1 Release Notes
    • JNIWrapper 1.2 Release Notes
    • JNIWrapper 1.3 Release Notes
    • JNIWrapper 2.0 for Windows Release Notes
    • JNIWrapper 2.1. for Windows Release Notes
    • JNIWrapper 2.2 for WIndows Release Notes
    • JNIWrapper 2.3 for WIndows Release Notes
    • JNIWrapper 2.4 for Windows
    • JNIWrapper 2.4.1 for WIndows Release Notes
    • JNIWrapper 2.5 Beta for Windows Release Notes
    • JNIWrapper 2.5 for WIndows Release Notes
    • JNIWrapper 2.6 for Windows Release Notes
    • JNIWrapper 2.7 for Windows Release Notes
    • JNIWrapper 2.7.1 for Windows Release Notes
    • JNIWrapper 2.8 for Windows Release Notes
    • JNIWrapper 2.8.5 for Windows Release Notes
    • JNIWrapper 2.9 for Windows Release Notes
    • JNIWrapper 2.9.5 for Windows Release Notes
    • JNIWrapper 3.0 Release Notes
    • JNIWrapper 3.1 Release Notes
    • JNIWrapper 3.10 Release Notes
    • JNIWrapper 3.11 Release Notes
    • JNIWrapper 3.12 Release Notes
    • JNIWrapper 3.2 Release Notes
    • JNIWrapper 3.3 Release Notes
    • JNIWrapper 3.4 Release Notes
    • JNIWrapper 3.5 Release Notes
    • JNIWrapper 3.6 Release Notes
    • JNIWrapper 3.6.1 Release Notes
    • JNIWrapper 3.7 Release Notes
    • JNIWrapper 3.7.1 Release Notes
    • JNIWrapper 3.7.2 Release Notes
    • JNIWrapper 3.7.3 Release Notes
    • JNIWrapper 3.8 Release Notes
    • JNIWrapper 3.8.1 Release Notes
    • JNIWrapper 3.8.2 Release Notes
    • JNIWrapper 3.8.3 Release Notes
    • JNIWrapper 3.8.4 Release Notes
    • JNIWrapper 3.9 Release Notes
    • JNIWrapper for IBM AIX Release Notes
    • JNIWrapper for Linux 1.0 Release Notes
    • JNIWrapper for Solaris UltraSPARC
    • JNIWrapper for Windows & Linux version 1.4 Release Notes
    • JNIWrapper for Windows version 1.3.1 Release Notes
    • JNIWrapper 3.13 Release Notes
  • More
    • Home
    • Documentation
      • Frequently Asked Questions
        • Gathering Information about Licence Errors
        • General
        • Technical
        • WinPack
      • Installation Instructions
      • Javadoc
      • Logging in JNIWrapper
        • Enabling Log4J in JNIWrapper
      • Mapping Native Types to JNIWrapper Classes
      • Mapping Windows Data Types
      • Programmer's Guide
      • Supported Platforms
      • Troubleshooting
      • Tutorial
    • Samples
      • JNIWrapper Samples
        • Basic JNIWrapper Sample
        • Bit Field Sample
        • Bit Structure
        • Callback Sample
        • Callback with Array Sample
        • Callback with Fill External Array Sample
        • Complex Array Sample
        • External String Pointer Sample
        • Function Call Sample
        • Key Value Structure
        • Linked Structure
        • Linked Structure Sample
        • Modifying the ACLs of an Object using JNIWrapper and WinPack
        • Primitive Array Sample
        • Resizing Pointer Sample
        • Sample Structure
        • String Array Sample
        • Structure Sample
        • Union Sample
        • Union Structure
        • Variable Sample
      • WinPack Samples
        • Access Services Remote Computer
        • Active Directory API Sample
        • Buzzer
        • Call Window Proc Sample
        • CBT Hook Sample
        • Check Admin Rights Sample
        • Choose Color Dialog Sample
        • Clipboard Viewer Sample
        • Custom Shape Window Sample
        • DDE Client Sample
        • DDE Service Sample
        • Enum Printers Sample
        • Enum Processes Sample
        • Enum Token Groups
        • Event Log Sample
        • File System Sample
        • File System Watcher Sample
        • Get Application Windows Sample
        • Get Computer Name Example
        • Hook Sample
        • Idle Tracker Sample
        • Java Taskbar Caption Sample
        • Journal Hook Sample
        • Low Level Keyboard Hook Sample
        • Low Level Mouse Hook Sample
        • Mixer Helper
        • Open/Save File Dialog Sample
        • Raw Keyboard Input Sample
        • Redirect STD Streams Example
        • Registry Key Enum Values Sample
        • Registry Key Set Values Sample
        • Sample Tray App
        • Select Folder Dialog Sample
        • ShellExecuteExExample
        • Win Event Hook Sample
        • Win Http Sample
        • Wnd Sample
        • WNetAddConnection2Sample
    • Release Notes
      • JNIWrapper 1.0 Release Notes
      • JNIWrapper 1.1 Release Notes
      • JNIWrapper 1.2 Release Notes
      • JNIWrapper 1.3 Release Notes
      • JNIWrapper 2.0 for Windows Release Notes
      • JNIWrapper 2.1. for Windows Release Notes
      • JNIWrapper 2.2 for WIndows Release Notes
      • JNIWrapper 2.3 for WIndows Release Notes
      • JNIWrapper 2.4 for Windows
      • JNIWrapper 2.4.1 for WIndows Release Notes
      • JNIWrapper 2.5 Beta for Windows Release Notes
      • JNIWrapper 2.5 for WIndows Release Notes
      • JNIWrapper 2.6 for Windows Release Notes
      • JNIWrapper 2.7 for Windows Release Notes
      • JNIWrapper 2.7.1 for Windows Release Notes
      • JNIWrapper 2.8 for Windows Release Notes
      • JNIWrapper 2.8.5 for Windows Release Notes
      • JNIWrapper 2.9 for Windows Release Notes
      • JNIWrapper 2.9.5 for Windows Release Notes
      • JNIWrapper 3.0 Release Notes
      • JNIWrapper 3.1 Release Notes
      • JNIWrapper 3.10 Release Notes
      • JNIWrapper 3.11 Release Notes
      • JNIWrapper 3.12 Release Notes
      • JNIWrapper 3.2 Release Notes
      • JNIWrapper 3.3 Release Notes
      • JNIWrapper 3.4 Release Notes
      • JNIWrapper 3.5 Release Notes
      • JNIWrapper 3.6 Release Notes
      • JNIWrapper 3.6.1 Release Notes
      • JNIWrapper 3.7 Release Notes
      • JNIWrapper 3.7.1 Release Notes
      • JNIWrapper 3.7.2 Release Notes
      • JNIWrapper 3.7.3 Release Notes
      • JNIWrapper 3.8 Release Notes
      • JNIWrapper 3.8.1 Release Notes
      • JNIWrapper 3.8.2 Release Notes
      • JNIWrapper 3.8.3 Release Notes
      • JNIWrapper 3.8.4 Release Notes
      • JNIWrapper 3.9 Release Notes
      • JNIWrapper for IBM AIX Release Notes
      • JNIWrapper for Linux 1.0 Release Notes
      • JNIWrapper for Solaris UltraSPARC
      • JNIWrapper for Windows & Linux version 1.4 Release Notes
      • JNIWrapper for Windows version 1.3.1 Release Notes
      • JNIWrapper 3.13 Release Notes

Documentation ‎> ‎Frequently Asked Questions

WinPack

Does WinPack library provide the wrapping for all Windows API?
Why is the NoSuchFunctionException thrown when I try to get the existing function from the user32 library? For example, new Library("user32").getFunction("GetWindowText")
Is it possible to make a Swing window transparent using WinPack?
Is it possible to change the standard rectangular shape of a Swing window to a custom one using WinPack?
Is it possible and how to get an error code when calling a standard function from the Windows API?
Is it possible to get or handle window messages of a Swing window? If yes, how is it possible?
Is it possible to get information about the file system (such as DriveType, FreeDiskSpace, TotalDiskSize) using WinPack?
Does WinPack provide API for working with MAPI?
Is it possible to terminate a process by using WinPack library? Is there any API for it?
Why does the Process.close() method not terminate a process?
Does WinPack provide API for listening to the system events, such as removing/inserting a drive, inserting/ejecting a CD/DVD drive, etc?
Is it possible to get the proxy setting of the Internet Explorer application using WinPack?
Is there any API in WinPack for accessing global system variables?
Is it possible to get a list of all running services on a remote computer using WinPack?
I'm using WinPack's FileSystemWatcher to monitor a folder. When a file is added to the folder I get 1 FILE_ADDED event and 3 FILE_MODIFIED events. When a file is modified I get 4 FILE_MODIFIED events. Is this correct behaviour?

Get answers to most commonly asked technical questions about WinPack. If you don’t find the answer here, please send us your question using the support forum and we will add it to this FAQ section after answering you.

Does WinPack library provide the wrapping for all Windows API?

No, it does not. It provides the wrapping only for the really useful features of the Windows platform that mostly are not available in Java.

Why is the NoSuchFunctionException thrown when I try to get the existing function from the user32 library? For example, new Library("user32").getFunction("GetWindowText")

Actually, there is no such "GetWindowText" function in the user32 library, but there are two appropriate "GetWindowTextA" and "GetWindowTextW" functions, representing ANSI and Unicode versions, respectively.

Is it possible to make a Swing window transparent using WinPack?

Yes, it is possible. There is a special Wnd class for this. Please view the WinPack Demo application that demonstrates such this ability.

Is it possible to change the standard rectangular shape of a Swing window to a custom one using WinPack?

Yes, it is possible. You can do this using the Wnd and Region classes from WinPack library. Please view the WinPack Demo application that demonstrates such this ability.

Is it possible and how to get an error code when calling a standard function from the Windows API?

Under the Windows platform, the Function.invoke() method returns the value that is an error code. This error code can be translated to an appropriate error message by using the LastError.getMessage(long errorCode) method.

Is it possible to get or handle window messages of a Swing window? If yes, how is it possible?

Yes, it is possible. WinPack provides a special WindowProc class which lets you substitute the standard window procedure of a Swing window and listen to its messages.

Is it possible to get information about the file system (such as DriveType, FreeDiskSpace, TotalDiskSize) using WinPack?

Yes. There is a special FileSystem class that provides such ability.

Does WinPack provide API for working with MAPI?

Yes, WinPack provides it. All MAPI related classes can be found in the com.jniwrapper.win32.mapi package.

Is it possible to terminate a process by using WinPack library? Is there any API for it?

Yes, in WinPack there is Processes API that allows you to manipulate processes, including process termination.

Why does the Process.close() method not terminate a process?

To terminate a process, you should use the Process.terminate(long exitCode) The close() method just closes the handle of a given process.

Does WinPack provide API for listening to the system events, such as removing/inserting a drive, inserting/ejecting a CD/DVD drive, etc?

Yes, we have added such ability to WinPack version 3.0. There is a special ShellEventsSubscriber class (from the com.jniwrapper.win32.shell.events package) that provides API for this purpose.

Is it possible to get the proxy setting of the Internet Explorer application using WinPack?

Yes, WinPack provides special API for this purpose. You can find it in the com.jniwrapper.win32.winhttp package.

Is there any API in WinPack for accessing global system variables?

There is a special com.jniwrapper.win32.system.SystemVariables class that provides such ability.

Is it possible to get a list of all running services on a remote computer using WinPack?

The Services API from WinPack library (com.jniwrapper.win32.service package) provides such ability.

I'm using WinPack's FileSystemWatcher to monitor a folder. When a file is added to the folder I get 1 FILE_ADDED event and 3 FILE_MODIFIED events. When a file is modified I get 4 FILE_MODIFIED events. Is this correct behaviour?

The number of receiving events depends on options of the FileSystemWatcher object. There are several kinds of notifications in the FileSystemWatcher.WatcherOptions class and they all set to true by default. That's why you get many FILE_MODIFIED events. But you can easily disable the unwanted ones. For example:

FileSystemWatcher watcher = new FileSystemWatcher(folder, true);

FileSystemWatcher.WatcherOptions options = watcher.getOptions();

options.setNotifyChangeAttributes(false);

options.setNotifyChangeSize(false);

and so on.

Terms and Privacy  © 2002 – 2021 TeamDev. All rights reserved.

Report abuse
Page details
Page updated
Report abuse