Invoking Methods in Unmanaged DLLs

Despite its aim of being a globally portable platform, the Java language has always acknowledged the potential need to interact with non-Java code. The Java platform defines the Java Native Interface (JNI), which allows a developer to create native language adapters (typically written in C or C++) for interfacing with non-Java libraries. JNI provides tools and defines language bindings, allowing you to pass Java objects and types to a native language adapter, which can then convert them to native language types before forwarding them to the target library. Although JNI can generate skeleton code for an adapter, you must implement the adapter yourself. Thus, although the scheme used is highly flexible, you must ...

Get Microsoft® Visual J#™ .NET (Core Reference) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.