Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for a kind .netter for a VB6.0 dark-ager

Status
Not open for further replies.

WCSBC

Programmer
Jul 16, 2003
12
GB
I need a COM DLL which I can use in my VB6 project - can anyone help?

a) I wish to pass an XML String to the object
b) This should then be canonicalized (xmldsigc14NTransform)
c) The canonicalized form of the string should then be SHA1 hashed to produce the digest.
d) The hash should be Base64 Encoded
e) Returns the Base64 as a string for me to do what I need with it.

I know that this can be done using .net SDK for port over Window200/XP. If possible source code and dependencies for distributables on msi would be appreciated.

Is there anyone who would help with this? I have done extensive web searches to get around the Canonicalization problem, but cannot find a COM to do it.

Various implementations (openssl/libxml2 etc) don't provide the object that I need.
 
I don't know about the canonicalization problem, but if you can do that in .Net then yes, you can create a COM ineterop for your .Net library that VB6 can access. I'll warn you though, it's a pain in the rear.

I don't have the instructions handy any more, but you need to use regasm (on every machine that will run the VB6 app that calls the .Net library) to create/register a .tlb file. The .tlb file works kind of like a header translator. I takes the signatures of your public objects/methods from the .Net library, and create COM based headers that call those headers. The benefit being that if you need to change the code in the .Net app, you don't have to re-register the library, unless you change the signature of the methods.

Using Inno or some other improved COM based install package, you can probably have the regasm step automated for deployment.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Thanks for your very prompt reply - What I am after is the .net com object that does the job. I can take care of the deployment. The canonicalize is in .net with XMLDsigC14NTransform, passing the transformation back. I cannot do this in VB6 without the COM. I do not have a .net environment to create the dll.
Any more help would be appreciated.
 
You don't need VS.Net to create a .Net library. All of the code files for .Net are text files, and the compiler is included in the .Net Framework distributable. You're on your own for doing it that way though, I know there's documentation on how to do it, but I've never been one to ice skate uphill.

Once you have the .Net dll, you'll need to run regasm on it to create and register the tlb file. That tlb file is COM accessible.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
OK.
The pointer is there for me - skating uphill is unfortunately my lot at the moment. Many thanks for your reply. If I can find the way to do it, I'll mark you as "friendly and helpful"!
 
Good call Chrissie! I haven't used Sharpdev for a couple of years now, but if it's continued to improve, it would be a great, and FREE solution. Atleast it would give you a solid toolset for makeing the .Net library.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Thanks Folks,
Looking at sharpdev there are a lot of projects available.
Finding what I need may well take me some time. Many thanks, I'll search and let you know if I can actually get to what is required.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top