Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JNA's W32API.* - where are they?

Tags:

java

jna

I just downloaded both jna.jar and platform.jar (ver. 3.2.7) from http://java.net/projects/jna/downloads/directory/3.2.7 and according to http://jna.java.net/javadoc/platform/com/sun/jna/platform/win32/W32API.html I should find the W32API interface but I can't locate it.

Anyone can shed some light on this? Thanks.

Best Regards, Joe

like image 515
JoeSlav Avatar asked May 27 '11 16:05

JoeSlav


People also ask

How to use JNA in Java?

Using JNA is a two-step process: First, we create a Java interface that extends JNA's Library interface to describe the methods and types used when... Next, we pass this interface to JNA which returns a concrete implementation of this interface that we use to invoke...

Does JNA protect us from misusing an API?

As mentioned before, JNA does not protect us from misusing a given API, especially when dealing with memory buffers passed back and forth native code. In normal situations, such errors result in an access violation and terminate the JVM. JNA supports, to some extent, a method that allows Java code to handle access violation errors.

What is the difference between Win32 and JNA?

The latter is a little tricky because the Win32 API is capable of retrieving all kinds of token information and takes a pointer to a buffer in memory. But in Java we want to get strongly typed Structure objects back. JNA simplifies this and makes pointer and structure virtually interchangeable by doing all the marshalling logic under the hood.

What is a w32api H error?

W32api.h file errors often occur during the startup phase of C-Free, but can also occur while the program is running. These types H errors are also known as “runtime errors” because they occur while C-Free is running. Here are some of the most common w32api.h runtime errors: w32api.h could not be found. w32api.h error. w32api.h failed to load.


1 Answers

This class has been split up into Multiple classes in 3.2.7. You can either revert to 3.2.5 to get the class as is, or, you can use these newer classes into which W32API has been split.

com.sun.jna.win32.W32APIOptions -->jna.jar

com.sun.jna.win32.StdCallLibrary --> jna.jar

com.sun.jna.platform.win32.WinDef -->platform.jar

com.sun.jna.platform.win32.WinNT -->platform.jar

like image 50
Abhijith Avatar answered Oct 02 '22 08:10

Abhijith