JNI linkage issue

From: Thomas Dorris (twdorris_at_mip.net)
Date: 01/31/04


Date: 31 Jan 2004 04:24:14 -0800

I'm attempting to disassemble the COMMAPI's win32com.dll file, make a
simple change, then re-assemble it into a replacement win32com.dll.
To start, I really just want to disassemble then reassemble the
original win32com.dll to verify that the process works. But, so far,
it's not. I'm using pedasm to generate the disassembly. I have to
clean up a few of the names it spits out to make it reassemble OK and
generate a .dll file. Using dumppe on both the original win32com.dll
and the newly generated one shows that exported names as well as
import names from other DLLs match. The "hints" for the imported
names don't match up, but I don't know exactly what that means.
Additionally, the newly generated DLL shows "local symbols stripped"
as one of the characteristics where as the original DLL does not.
Otherwise, they appear identical.

Now, the problem. When this new .dll file is used by the JVM in a
sample COM port application, the DLL load fails with the following:

Error loading win32com: java.lang.UnsatisfiedLinkError:
C:\jre\bin\win32com.dll: Invalid access to memory location

This "feels" like something stupid. Like I'm using some wrong
libraries to link against or something like that. But I just can't
figure it out. Anybody have any ideas? Clearly the JVM is locating
the DLL file, bit just fails to load it.

Thomas Dorris



Relevant Pages

  • Re: Stripping functions from a DLL - offer wanted
    ... Functions from a DLL, and the solution he seems to prefer, is ... Replacing the unwanted materials ... The only logical way is to disassemble with RosAsm, ... using a hex editor would be a poor solution. ...
    (alt.lang.asm)
  • Re: DLL Exports, determine Arg types and RetVal?
    ... Disassemble de DLL. ... Either search in the DLL what it does with the Parameter, ... being transmiting to the DLL Function. ... real parameters are often times difficult to exactly point ...
    (alt.lang.asm)
  • Re: JNI linkage issue
    ... I really just want to disassemble then reassemble the ... > as one of the characteristics where as the original DLL does not. ... bit just fails to load it. ... I fail to see how this is a JNI issue, ...
    (comp.lang.java.programmer)
  • Re: W32/Nimda and Outlook Web Access
    ... > nature of how Outlook Web Access works, especially with regards to the Log ... It puts a dll in places it's likely to get run. ... infect them and spread that way. ... DLL I did not disassemble that did it. ...
    (Focus-Microsoft)
  • Re: How do I setup Debug for COM in-proc server in VS 2005?
    ... I followed your steps and I am able to attach to the .msc process and debug ... Windows sdk example didn't use CoInitialize. ... Was is the sample code in th SDK you used to built your dll from? ... long at memory location 0x00d8e750.. ...
    (microsoft.public.win32.programmer.ole)