Hi C-SharpCorner,
I have had this issue for over a month already and have yet found a solution. A client of mine has asked me to write an application using .NET C# (4.0) for buying and selling stocks. The application is basically complete, less this issue I'm encountering. Before an order can be submitted to their servers, the order (message in ascii format) must be signed with a hash algorithm, and further encrypted with a private-key. I have already spent the past month learning all I can about public-private-secret key encryption, RSA, DES, etc.., but without resolve. I have recently learned their encryption algorithm uses the SSL library, which in turns uses the DES encryption. Therefore without a known IV, there is not much I can do to try and encrypt the order-message manually.
The next step in finding a solution is to use a library provided by the client. The package I received is a .cab file containing various .dlls (axekey.dll, cryptoki.dll, pkns32.dll, and taica.dll), and an .inf file. I am told this library is actually an ActiveX web-service library, and must be installed on (I suppose) a web-service, like IIS
Here is the issue I am having: it is unlikely for the users of my winform to have IIS installed, and even less likely to have them installed as a program requirement. What I want to do is be able to interop directly into the axekey.dll and call the functions directly. The only documentation I have in this regard is usage through web-requests (ie. ../cgi-bin/ekey/axekey.cab#)
Is what I am proposing even possible?
What are the possible avenues I should be investigating?
So more additional info:
By using a tool called PE-Explorer, I was able to find a lot of information about this dll, including its imports and exports. For its exports, I can see the following information: DllCanUnloadNow, DllGetClassObject, DllRegisterServer, and DllUnregisterServer. From what I understand, there are not the methods (or entry-points) I should be using from the C# interop.
Furthmore, by using the MS tool tlbimp, I was able to create a CLI wrapper for this library (axekey.dll), the output is called SYSORDERLib.dll of which a whole host of information was further discovered; including: something called CoClass, some Dispatch, a bunch of GUIDs, functions, properties, etc.
Now I really just want to know, how should I DllImport into this information?
Further info can be supplied upon request. There is just too many reports generated by PE-Explorer for me to post everything here.
Loading
kelvin leePosted Aug 24, 2011, 3:36 AM
Sam HobbsPosted Aug 24, 2011, 2:27 AM
kelvin leePosted Aug 23, 2011, 11:07 PM
Getting the documentation for this specific library is actually not that much of an issue. In fact, on hand I have 3 word documents specifying how the ActiveX library should be called via web-service; and how my messages should be POSTed to the service; and the responses (inc. error codes). However as you can imagine, these are not the documentation I am looking for. From what I understand, the library was developed in 2003 by a third-party - hence getting additional info/source-code is out of the question.
When I tried to right-click the .inf file, I get an Install Error pop-up, "The INF file you selected does not support this method of installation". Here is the listing of the contents of the .inf file:
Sam HobbsPosted Aug 23, 2011, 6:32 AM
Then look for the documentaiton. Who ever gave you the software should give you documentation too.
If you must try to use it without installation instructions, then install using the inf file. You should be able to right-click the inf file in the Windows Explorer to install it. I don't know how to specify that it be done using Administrator privileges or if that is necessary.
Then the library should be available in the COM tab of the references when you add a reference to a project. Do not try to use DllImport! Everything you said about the library is consistent with it being a COM object. After adding a reference for the library, use the Object Browser in Visual Studio to learn about it.