Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Register .net dll on client machine and use its methods

Register .net dll on client machine and use its methods

Register .net dll on client machine and use its methods

Hello All,

I want to use .NET dll in my VFP 9 program
In IDE mode I am able to generate tlb file and call it using object browser
i use following command to generate tlb and call it in object browser

regasm d:\myproject1608\MyPartnerASP.dll /tlb

On client Machine
I have done as follows
1) regasm d:\myproject1608\MyPartnerASP.dll /tlb ----tlb generated succesfully
2) TLb and dll both are in d:\myproject1608 folder
3) tlb and dll both i have tried putting in c:\windows\system32 and c:\windows\syswow64 folder
4) regsvr32 will not work

code fails at CREATEOBJECT("MyPartnerASP.Relay.ReadClientData")
OLE Error Code 0x80070002: The system cannot find the file specified

This works ok on development machine where I use the step Toos-->Object Browser-->Com Library-->MyPartnerASP.tlb

Any help would be very greatful

Thanks in Advance

RE: Register .net dll on client machine and use its methods

At the risk of stating the obvious, is the .net framework installed on your target machine?


Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: Register .net dll on client machine and use its methods

Since the error isn't "Class not registered" you already have the COM registration, but you miss dependencies, so Griff has a good point.

The .net framework...the right version of it. It may even involve dependencies on other assemblies.

And yes, regsvr32 does not work, an assembly is registered as an assembly in the first place, using regasm, as you did. It has to be built with COM interop and then it also works via COM.

You might give the wwwDotnet Bridge (https://west-wind.com/wwDotnetBridge.aspx) a try, but it will have the same dependency problems. It might give some more hints on what's missing. you can't make use of dependency walker here, to find such additional assemblies it needs, but it might tell you the CLR version necessary.

Bye, Olaf.

RE: Register .net dll on client machine and use its methods


I ensure that .net framework 4 and above is installed

Can you please guide me what care is to be taken when building dll so that I can pass on that information to the programmer.

As I am not familiar with .NET environment deploying any help would be very appreciated.

Like what options to be checked when building


RE: Register .net dll on client machine and use its methods

>I ensure that .net framework 4 and above is installed

If 3.0 or 3.5 were used, you also need 3.0 or 3.5 This is not a "latest version fits all" thing.

Bye, Olaf.

RE: Register .net dll on client machine and use its methods


Yes sir I have ensured that all the frame works are installed in the machine
In the client machine if
1) I install VFP 9
2) generate tlb using regasm
3) Even if I browse the tlb in Object Browser it shows the methods and classes

But what i want is to be able to call this method without IDE
A setup to register this file is required

Thanks for your support

RE: Register .net dll on client machine and use its methods

You don't generate the tlb using regasm, the COm interop info leading to the tlb file already has to be in the DLL, or else you don't get COM interop. I pointed you to the necessary topics. This is just the table of contents...

regasm is the exe available everywhere to make the registration process. The limited Installshield Express coming with VFP has no capabiliteis to register assemblies via regasm, it provides no way for individual commands to execute during compilation, so either you upgrade to a full version or you go for something else, like Inno Setup.

Aside of that as far as I understood you, you did not even have access in one single test client case, so your learning curve still is at how to ensure all prerequisites for a successful usage of that assembly.

Bye, Olaf.

RE: Register .net dll on client machine and use its methods

Hello Sir,

Yes Sir this is 3rd party dll which I need to integrate and supply in my vfp application.
So the dll is missing COM Interop Info as per your suggestion.

And I had a belief that if I could call it using object browser client machine would be just registering the dll.

Will need to check with how to user Inno Setup to register this dll on client machine

Thanks for your support and any other of your insights will be helpful

RE: Register .net dll on client machine and use its methods

If this assembly is not built for COM interop registering with /tlb does not help. It never adds typelib info, it extracts it and shows what it registers. There must be some COM interop in this DLL, because otherwise, as I already said your CREATEOBJECT() would fail with "class not registered". something IS registered, so some typelib info is included in this assembly.

For absolutely native assemblies with no intention for COM interop, the wwDotnet Bridge I pointed to is extracting the class info and generating a COM wrapper on the fly. That means a bridge is done by having a proxy class VFP can call, which then in turn calls the assembly class. But this also has its limits.

If you donÄt succeed in one test installation manually doing regasm, Inno Setup also won't help you with that.

Bye, Olaf.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close