Link to home
Start Free TrialLog in
Avatar of fbk2000
fbk2000

asked on

Importing .Net DLLs into Delphi 7

I am currently maintaining a product in the Delphi 7 environment that requires additional functionality implemented in a .net (c#, I believe) dll library.

So during development I imported the type library which created the TLB file, wrote the code, and on the developement machine it works fine.  Then I try to move this application to another machine it doesn't work, claiming an OLEError, "Class not registered"

Most likely I'm missing something, but I don't really know much about how the .net DLLs work, except that I can't register them in the normal way.

So my question is, what am I doing or not doing that I should be or shouldn't be?

How do I register this dll?
Avatar of 2266180
2266180
Flag of United States of America image

you have to get that .NET dll on the other machine and register it with regasm.exe(it's in the .net framework directory) (you must use the same .NET framework as on the development machine, though it might be compatible with newer .net version, but I never tried such thing.)
Avatar of fbk2000
fbk2000

ASKER

Ok, I've registered it, and now I'm gettings "Interface not supported"

I've done some searching as I suppose that if you didn't get any errors and it said successfull at dll registration, then there might be an error in system configuration.

I suggest to first do the following before attempting to do anything else:
- restart pc, try again
- use a COM explorer utility and see that indeed the interface you are using is there (you might be missing some assemblied for that .net dll) (one such utility is: http://www.4developers.com/com/index.htm )

if that does not fix it, then try the info from the following pages:
http://www.delphi32.com/info_facts/faq/faq_132.asp
http://www.distribucon.com/dcom95.html
ASKER CERTIFIED SOLUTION
Avatar of Mihai Stancescu
Mihai Stancescu
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fbk2000

ASKER

Turns out the correct DLL was not installed.