QUOTE(vikasck @ 22 Jun, 2009 - 05:50 AM)

Hi,
I had an SDK from a third party vendor that consisted of a .JAR file.
I used a Software to convert the .JAR file to a .DLL so that it could be deployed in .Net & I was successful in doing so.
I then Added a reference of the DLL Created in my ASP.Net project.
There is a method called GetServices() which is supposed to return an Array of Services [String].
This method ByDefault references a file which is in the installation folder of the SDK containing the IPAddress and Port Number of the Server with which my Application has to communicate to get some Private Data.
The method & its members are actually encapsulated & is not visible.
In Java, We actually set the CLASSPATH to the folder where the .jar file and the IPAddress File resides.
But in .Net there is no concept of classpath.
Steps tried :
1.) Tried to copy the IPAddress file to the BIN folder of the Project.
2.) Tried to verify whether the DLL was compiled Properly & found that it was working alright.
OutCome:
Getting null instead of a string Array after execution of Getservices() method.
Question : [u]
The problem in 1 line would be to make the Method GetServices() access the file & inturn communicate with the Server to fetch an array of string data.
Please revert back ASAP & do contact me for further explanation.
Thanks
Have you tried creating an instance of the function using <DLLimport(".....")>? This is an old VB trick to getting access to a DLL function without including the whole dll as a reference to the application. Check out the full format for this attribute to see what each of the settings are and see if you can get access to the dll like you want. Also, you might better cracking the JAR open and getting a couple programmers together and making your own DLL from the JAR. I generally dont trust translator/convertors that do something like that. JAR files if done right are security strong and therefore the best someone could do is estimate what the class/methods are doing. Unlike JAVA files, you cant directly look and see what they are doing in a JAR.