Other Issues - how to break java dll into source code???

Asked By avula on 12-Oct-11 06:48 AM
Hi Every One,

how to break java dll into source code???
Jitendra Faye replied to avula on 12-Oct-11 06:51 AM
For that you have use third party tool.

follow this link-

http://toolkit.software.informer.com/download-toolkit-convert-dll-to-source-code/

http://vb6-dll-decompiler.qarchive.org/

Here you will get information,.
Reena Jain replied to avula on 12-Oct-11 06:52 AM
hi,

If the DLL is in a .net language, you can decompile it using a tool like .net reflector and then debug against the source code.

try this and let me know
Srikanth K replied to avula on 12-Oct-11 07:03 AM

you just treat the decompiled source code as a new library within your project and set breakpoints in the source. Remove all references to the 3rd party DLL so that it is the decompiled code that is executing.

Other things:

  • You may be breaking the law by decompiling the code, or breaching a licensing agreement with the 3rd party vendor. Make sure to review this with someone.
  • You will want to make sure that you remove references to your decompiled version if you are shipping to other developers, or checking into a larger source tree. Easy to forget this!

There are two methods I've come across:

1) Accessing the DLL project from the using project This involves building the DLL in a separate instance of VS then accessing the DLL through a different project in VS (this assumes you have the source code). There a number of ways to accomplish this:

  • You can add Trace.WriteLine statements in the DLL that will show up in the 'Output' window in VS.
  • You can add System.Diagnostics.Debugger.Break() statements to the DLL code. When running the calling project in VS, program execution will stop there. From here you can add access the call stack (including all function calls in DLL itself) and set break points (although you the icon for the break point will appear disabled and the hover text for the break point will read "The breakpoint will not currently be hit. No symbols have been loaded for this document").
  • If the DLL is throwing an exception (which you can see from the 'Output' window if the exception is caught and handled by the DLL) you can tell VS to always break when that type of exception is thrown. Hit Ctrl-Alt-E, find the type of exception being thrown, and click the 'Throw' column for that exception. From here it is exactly as if you had used System.Diagnostics.Debugger.Break() (see above).

2) Attaching a using process to the DLL project This involved hooking the VS debugger into a running process.

  • Open the DLL project in VS.
  • Run an application that uses the DLL (this application can't be run from another instance of VS since the process will already have a debugger attached to it).
  • From here you can add break points and step through the DLL code loaded in VS (although the break point will appear disabled the same as in method 1).
dipa ahuja replied to avula on 12-Oct-11 08:19 AM
Untitled document
You can convert that File/EXE into dll using the tool IKVM.NET
 
<http://www.ikvm.net/>
 
Download the tool from that site:
After downloading Follow the steps :
1. From start -> Run -> cmd
 
2. Go to the directrory where you have saved the ikvm.net  ->
 
cd d:/ikvm/bin
 
3. Perform the command
ikvmc <your file name>   
ex: ikvmc f:\frm.exe
 
Now you will show the message that:
 
"Output file is frm.dll"
it will be created in the bin directory of ikvm
 
To Use the dll
-------------------
To add this dll you just have right click on your project and click on "Add Reference".
Hope this will help you!!