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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generation of a .tlb file

Status
Not open for further replies.

CCHSR

Programmer
Aug 3, 2005
15
US
I have a dll that is designed to be used in an .net application it is called ICVTnsClient.dll and it is used in a credit card application.
The program that uses it is ICVERIFY.
The basic purpose is to encrypt and decrypt the request file.
The SDK talks about generating a .tlb file that has to be included in the C++/VB code.
My program is written in Visual Fox Pro Ver 6.0, how would one go about including the dll so that I could
call upon the methods contained in the dll.
I have read a few of the posts related to .tlb files, and none of them seem to talk about this in a way
that I could relate.

Any sugestions would be appreciated.

Regards
Craig
 
You are misinformed by the vendor of that DLL, but my not know better.

TLB is short for typelib information and that points toward that DLL to have COM classes you can use. If you have any sample VB code that would help.
As a first step you'll need to use regsvr32.exe to register that DLL and then the VFP object browser will list it under Oopen->COM Libraries. That means you start the object browser from tools menu, choose the open tool from the toolbar (leftmost item) and then in the open dialog select the COM Librares register. If youre there you can also browse for that DLL, but usage of the dll would still require registration.

As it's intended for .NET what you may need instead of regsvr32 is regasm, as it's a COM enabled assembly.

Bye, Olaf.
 
Olaf,

Thank you for your prompt reply.
I have both VB Code and C#.net code examples, how am I able to get them to you,
I have never attached anything before.
I did try to register the dll with regsvr32, but came back with error (DllRegisterServer Entrry Point Not Found).
Then tried regasm.exe, but not found on my system.

Regards
Craig
 
Hi Craig, and welcome to the forum.

I have both VB Code and C#.net code examples, how am I able to get them to you,

In general, it's best to post code publicly, rather than send it to an individual forum member. That way, everyone can see it, and other forum members can take part in - and learn from - the discussion.

However, in this case, I get the impression that the code is proprietary. To avoid copyright issues, you should check with the vendor (or whoever else wrote the code) for permission to share it.

If you do post code in the forum, be sure to wrap it in [ignore]
Code:
[/ignore] tags to make it more readable.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

[url=http://www.ml-consult.co.uk]Visual FoxPro articles, tips, training, consultancy[/url]
 
Mike,

I am not sure what you mean by
Code:
 tags.

Craig
 
If you don't find regasm on your system, where did you search? It's part of the .net framework and installed in the one or other version on systems with XP and later windows.

Is this DLL your only option? Because this all looks not very straight forward, if you haven't got Visual Studio. Thinking two steps ahead of your test usage on your system - redistribution, installation and registration on another target system alone is something even I would need to look into, before I could say how you'd do that. Most probably via installshield or inno or some other installer system.

But I doubt there is nothing you can use more directly in VFP for credit card processing.
for example with a little googling I find
(Medasyst, XCharge)

Bye, Olaf
 
Olaf,
I found 3 versions of .net on my system v1.1.4322, v2.0.50727, v4.0.30319.
Does one need to have all 3 versions on the system?
I ran v4.0 regasm.exe against the dll and it claimed to have registered it.
Do I have to have VB or Visual Studio to look at it's methods or properties,
or can I look at it with VFP.

Craig

 
The different versions of dotnet are needed for different version applications or tools, so in short: yes. If they are there, they are needed by something. Like you can't deinstall the vfp6 runtime, if there are vfp7,8 or 9 runtime DLLs installed, too.

As you have registered it, it should show up in the VFP object browser I mentioned above.

Bye, Olaf.
 
I am not sure what you mean by [ignore]
Code:
[/ignore] tags.[/quote]

They're used to format text in a forum post to make it look like program code, which makes it easier to read.

You can either:

1. Type [ignore][code][/ignore] at the start of the code, and [ignore]
[/ignore] at the end; or

2. Highlight the text, and click the Code button in the editing window's toolbar (if your browser supports this).

However, having read the rest of this thread, I'm not convinced that posting the example VB or C++ code will take us any further forward.

Mike




__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Thanks Mike,Oalf,

After I registered it, tried to look at it thru Object Browser (VFP9.0) as my VFP6.0 does not have one,
but I could not find it in the COM libaries.
I will talk to the support group at ICVERIFY.

Any other suggestions.
Regards
Craig
 
I don't know if VFP6 doesn't also have the object browser, but since you have VFP9 that's fine.

Hmm, seems the registation didnb't really succeed. This can easily happen, if you don't run the SDK command prompt as admin. Then regasm as regsvr32 reports success while UAC redirected unallowed registry writes to a virtual branch.

Bye, Olaf.
 
Olaf,

I did run the regasm.exe as admin under XP SP3.
Maybe I check on running regasm.exe and try to see if I did it right.
I talked to tech support at ICVERIFY and they told me VFP6.0 is the preferred software to use other than newer versions.
I am going to inlist their help, their support fee is $750.00 for a year, which also covers as many stations as needed.
I was hoping to do on my own, but guess not.

Thanks,

Craig
 
Now you got me curious, what makes them say their assembly DLL works best with VFP6?

Bye, Olaf.
 
Olaf,

When I cough up the $750.00 I will find out.

I think there are just talking about the different versions of VFP.
Because all of their examples are in VB or .net Code.

Craig
 
Well, actually the COM interoperability advanced with VFP7, that had added features for handling DCOM, but since then nothing ni regard of OLE capabilites of VFP changed. The way dotNET does COM interop does neither profit nor lose from that VFP change. The only reason I can think of is they have no other experience, but with VFP6.

An assembly will be COM visible by a COM wrapper, still the .net framework loads with the assembly and that makes it very decoupled from VFP anyway, no matter what VFP version.

You may need to add your assembly to the global assembly cache (GAC) to be able to use it.

Bye, Olaf.
 
My program is written in Visual Fox Pro Ver 6.0, how would one go about including the dll so that I could call upon the methods contained in the dll.

You must include classes that are OLEPUBLIC in the project. These classes become visible and usable in the final dll.

came back with error (DllRegisterServer Entrry Point Not Found)

This says you haven't done the first step, above.
 
This is how you get ICVerify's (a tremendously bad piece of software) encryption client and server working:

1) Make sure the "ICVTnsServer" service is running on your server (or local machine if using that as your server).
2) Open port 11000 on your server where the above service is running.
3) To simplify life, put EncryptionManager.dll and ICVTnsClient.dll in your windows\system32 directory.
4) Locate regasm on your PC. Use whatever the latest version is that you find. It's part of any .NET installation.
5) regasm \windows\system32\ICVTnsClient.dll /tlb
6) regasm \windows\system32\ICVTnsClient.dll /codebase (may not be necessary - I'm not sure)
7) regasm \windows\system32\EncryptionManager.dll /tlb (may not be necessary - I'm not sure)
8) regasm \windows\system32\EncryptionManager.dll /codebase (may not be necessary - I'm not sure)
9) On your client machine (or the server if you're using the same machine for both) copy ICVTnsClient.dll.config from the SDK installation directory to \windows\system32, and change this:
Code:
    <add key="MachineName" value="[b]whatever they've got here[/b]" />
to this:
Code:
    <add key="MachineName" value="your server's IP address" />
10) Start the "ICVerify Multi User" application on your server (\ICVERIFY\ICWin4xx\icvmlt32.exe)

You'll now have the service running on your server, the DLL's properly registered, and their file scanning program running waiting for your program to write transactions and read results.

As an aside, they store all of their data files in \icverify\ICWin420\DATADIR using the same encryption protocol, so you can easily decode things and write directly to the files manually, if you really want to bypass their horrid user interface. This is useful if your app wants to know batch totals, or create historical reports, etc. You can pretty much eliminate ICVerify from the any user interaction except for settling at the end of the day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top