Article View: borland.public.jbuilder.java.language
Article #16756Re: using jni to access an NT dll
From: Sergio Olivas
Date: Wed, 27 Jan 1999 00:00
Date: Wed, 27 Jan 1999 00:00
52 lines
2143 bytes
2143 bytes
I guess you might need to do that.... I'm using Visual C++ to
interface to a custom API dll so I'm writing a wrapper dll to just
what you're thinking... I'm hoping I'm also doing the right thing...
when building this dll, I link into the real dll by including the lib
file of the dll.
The an example func of the original api looks like:
DLLExport BOOL setDebugMode(BOOL bDebug);
for JNI interface, I'm doing....
extern "C"
{
JNIEXPORT jboolean Java_JNI_P4API_setDebugMode (JNIEnv *env, jobject
obj, jboolean bDebug )
{
jboolean res = setDebugMode(bDebug);
return res;
}
where JNI is my package name, P4API is my class name.
sergio...
P.S. if you find a good reference on the net let me know... I'm using
stuff from Sun's Site, but would appreciate other examples...
On Sun, 3 Jan 1999 09:46:43 -0500, "Suneet Shah" <suneet@diamelle.com>
wrote:
>Hello:
>
> I am trying to use jni to call functions in an NT dll from a product that I
>need to interface to. The docs. that I have read indicate that for the
>integration to occur, java uses a mapping scheme such as the following:;
>
>packageName_className_functionName()
>
>this approach does not lend itself well to using a dll that comes with an
>existing library - which obviously will not follow that naming convention.
>
>How do I interface with this dll? Do I need to write a wrapper dll that
>will follow that format?
>
>Thanks
>Suneet
>
>
Technical Details
Message-ID:
<36ae66c9.517420741@oldnews.supernews.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<76nvhf$6ij2@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,52ab9fce12637aa8 X-Google-Attributes: gidf74b3,public From: sxolivas@home.com (Sergio Olivas) Subject: Re: using jni to access an NT dll Date: 1999/01/27 Message-ID: <36ae66c9.517420741@oldnews.supernews.com> X-Deja-AN: 437354367 Content-Transfer-Encoding: 7bit References: <76nvhf$6ij2@forums.borland.com> Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsabuse@remarQ.com X-Trace: 917403141 CSJD6YG.O753FCFEE usenet49.supernews.com Organization: Posted via RemarQ, http://www.remarQ.com - Discussions start here! Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language