🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17002

Re: Accessing a C++ dll

#17002
From: Wayne Cole
Date: Thu, 24 Dec 1998 00:00
33 lines
1431 bytes
In article <74s6ie$gp314@forums.borland.com>, leavym@easynet.co.uk 
says...
> Hi,
> 
>     I'm trying to write some Java code that accesses some methods in a C++
> Dll. The only way
> i've seen of doing this is to generate the .h and .c files using javah, and
> then amending the code
> in the dll.
> 
> Is there a way to directly 'import' the dll without having to change to C++
> code to include the genrated header file, as the source code may not always
> be available.
> 
> All the texts i have read seem to point to the 'javah' method. There must be
> another way???
> 
> Thanks
> 
> Mark
> 
> (Also any links to sites about this topic would be helpful)
> 
> 
> 
If all you have is a .dll, no access to the source of the .dll, then you 
have to create your own .dll with the 'glue' code that provides the 
interface between JNI Java and a C/C++ routine that calls the other .dll 
functions and returns the appropriate data to the Java application.

-- 

wmc
Technical Details
Message-ID: <MPG.10ecb400fbb082be98968f@forums.inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <74s6ie$gp314@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,fd1d79e26c0f9583
X-Google-Attributes: gidf74b3,public
From: wmcole@ihpweb.com (Wayne Cole)
Subject: Re: Accessing a C++ dll
Date: 1998/12/24
Message-ID: <MPG.10ecb400fbb082be98968f@forums.inprise.com>
X-Deja-AN: 425666377
References: <74s6ie$gp314@forums.borland.com>
Organization: Infinity Heart Productions
Newsgroups: borland.public.jbuilder.java.language