Article View: borland.public.jbuilder.java.api
Article #1443Linking jbuilder 6 to dll file
From: chris
Date: Sun, 27 Jan 2002 00:43
Date: Sun, 27 Jan 2002 00:43
38 lines
2054 bytes
2054 bytes
Hello
I was wondering if anyone out there would know how to link jbuilder to dll
file. I am trying to access the parallel ports on NT and XP computers and
had to write an dll in c++ to read and write to and from the LPT1 port
(becuase I was having trouble getting the inputstream to read bytes from
parallel port using Java communication API, and after couple weeks of trying
gave up on that approach).
The class I wrote is a simple one and here code I used in jbuilder
public class accessport {
public accessport ( int portBase )
{
this.portBase = portBase;
}
/** Initialize the port */
public boolean Initialize(){
return accessport.StartInitialize();
}
public static native boolean StartInitialize();
static
{
System.loadLibrary("winio");
}
}
When I complie the program there no error, but when I try to run
Initialize() I get an
Exception occurred during event dispatching:
java.lang.UnsatisfiedLinkError: StartInitialize
I was wondering if anyone known what I need to do to get dll program to
work....
Thanks
Hope someone can help me
Technical Details
Message-ID:
<3c534d54_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.media.kyoto-u.ac.jp!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,22ca4dfc0309ea8f,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2002-01-26 16:51:30 PST Reply-To: "chris" <tborg1@bigpond.net.au> From: "chris" <tborg1@bigpond.net.au> Newsgroups: borland.public.jbuilder.java.api Subject: Linking jbuilder 6 to dll file Date: Sun, 27 Jan 2002 11:43:36 +1100 Lines: 43 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 144.137.101.36 Message-ID: <3c534d54_2@dnews> X-Trace: dnews 1012092244 144.137.101.36 (26 Jan 2002 16:44:04 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.media.kyoto-u.ac.jp!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews