jna

How does the SQL Server JDBC Trusted Connection Authentication work?

How does the SQL Server JDBC Trusted Connection Authentication work? (ie how does the trusted connection authenticate the logged in AD user in such a transparent and elegant fashion and how can I implement a similar authentication solution for my client-server applications in Java without a database connection or any use of the existing ...

possible java JNA issue

my java UI unexpectly terminated and dumped a hs_err_pid file. The file says "The crash happened outside the Java Virtual Machine in native code." So JNA is the only native code we use. Does anyone know of any know issues or bugs with any JNA version that might cause this. I've included some of the contents from the error file below. ...

Using JNA to link to custom dll

Hi, how do I access custom .lib / .dll functions using JNA? Can someone provide an example? Thank you. ...

JNA Struct and Pointer mapping

How does one map the function below to java? VOID WriteToStruct(BOOL *Status, STRUCT_MSG RecBuff) What this function does: 1) Populates the struct RecBuff 2) Updates status How do I map to a boolean pointer in Java and access the struct data updated by the function? ...

renaming DLL functions in JNA using StdCallFunctionMapper

I'm trying to use JNA with a DLL in Windows, so far I was able to successfully call a function called c_aa_find_devices(). But all the functions start with c_aa and I would like to rename it to find_devices(). From what I gather the way to do this is with StdCallFunctionMapper but I can't find the documentation of how to use it in an ex...

How would I map this Delphi function with JNA

I have the following Delphi function: function DoX(const InputBuffer: Pointer; const InputBufferSize: longword; OutputBuffer: Pointer; var OutputBufferSize: longword): longbool; The OutputBuffer and OutputBufferSize would be set in the function as part of the result, with a boolean return to indicate whether the method was successful ...

Use windows static libraries from java code with minimal effort (prefereably using JNA)

I have to use some static windows library (*.lib) from java code, I can write C++ JNI wrappers, but I'd rather not do it (not that experienced in C++). What would be the easiest (least developement effort) way use it, performance is not important, since that code will just be fetching some data, that most probrably will be worked on on...

Convert static windows library to dll

Question: I have a library contains a bunch of static *lib files, I wish to access them from JNA (a Java library that allows one to dynamically call `dll's from JAVA Code), so is there a way to magically change static lib to dll? Code was compiled using Visual studio (hope that is relevant), and I also have appropriate header files. ...

JNA Passing Structure By Reference Help

Hi all, I'm trying to use JNA to talk over a USB device plugged into the computer. Using Java and a .dll that was provided to me. I am having trouble with the Write function: C code: typedef struct { unsigned int id; unsigned int timestamp; unsigned char flags; unsigned char len; unsigned char data[16]; } CANMsg; ...

Structure of Image

using java and jna I call a fonction : trace(potrace_ bitmap_s) struct potrace_bitmap_s { int w, h; int dy; /* scanline offset in words */ potrace_word *map; /* pixel data, dy*h words */ }; typedef struct potrace_bitmap_s potrace_bitmap_t; w, h: are width and height of a bitmap in doc of library a found this Here, potrace_word...

JNA : EXCEPTION_ACCESS_VIOLATION

Hi, I use JNA to call this function in libpotrace.dll, this function is potrace_state_t *potrace_trace(const potrace_param_t *param, const potrace_bitmap_t *bm); parameters in library: typedef unsigned long potrace_word; struct potrace_bitmap_s { int w, h; /* width and height, in pixels */ int dy; /*...

What is the easiest way to call a Windows kernel function from Java?

While searching for how to do this, I found some vague discussion about different options, like JNI vs JNA, but not much in the way of concrete examples. Context: if Java's File.renameTo() cannot do it's job (for whatever reason; it is a little problematic), I'd like to fall back to directly using this native Windows function, which is ...

Is there an equivalent to http://www.pinvoke.net for JNA?

The PInvoke.net site documents PInvoke signatures, user-defined types, and other information that you need to call unmanaged APIs from managed .NET code. Is there a site that does the same for Java's JNA? ...

Well-supported Java ADSI wrapper library?

Does anyone know of a good wrapper for the Windows ADSI libraries for Java? (I'm trying to avoid writing my own in JNA - and I'd like to use something standard.) ...

How to map enum in JNA

Hi, I have the following enum how do i map in jna ?? This enum is further referenced in structure. typedef enum { eFtUsbDeviceNotShared, eFtUsbDeviceSharedActive, eFtUsbDeviceSharedNotActive, eFtUsbDeviceSharedNotPlugged, eFtUsbDeviceSharedProblem } eFtUsbDeviceStatus; Abdul Khaliq ...

java - JNI/JNA - Get Window Title

Looking to get back into the development space; primarily using Java to call some native win32 functions (I don't desire to build in .NET).... Can someone point me to a place where I can read the title from a differnt running window using Java (JNI/JNA/SWIG). Assume you would know where in the memory space the application you are attemp...

JNA undefined symbol

Hello, I'm trying to bind the dhcpctl library to Java using JNA. This is mi code (I didn't declare all the functions yet): package com.abiquo.abicloud.omapi; import com.abiquo.abicloud.omapi.DHCPControlStructure.DHCPCtrlDataString; import com.abiquo.abicloud.omapi.DHCPControlStructure.DHCPHandle; import com.abiquo.abicloud.omapi.Omapi...

Is there a tool which creates C header files for Delphi (Win32) DLLs?

Until now I have seen only tools and some information for the creation of Delphi code for a given C header file. However, in the 'Delphi first' case, there is a Delphi interface declaration and a generated DLL, and no C header. Are there tools which can extract the necessary information and build a C header file for a DLL? Such a tool ...

JNA - Access Violation, JVM terminats

Hi I am calling a DLL with passing a callback functio object to it. One of the functions is simple print. I have then, a loop of 100 iterations, just printing the index and a few prints after the loop. Here is the C code extern "C" int Start(void* callback(CString)) { for(int j=0; j<100; j++) callback(AConvertToString(j)); ...

I need a simple Example of JNA which can map char * of c dll.

I have one dll of cpp and i need to call its function which returns char*. Im using String in native Declaration but getting out put like ???? or some crap thing. I just want to knw that do i have to decode the String.i have already set my system property like System.setProperty("jna.encoding","UTF-8"); Im in big mess. Hope to get Some P...