简体   繁体   中英

how to register a .net dll not being used as a com interop in vb6?

I have a .net .dll written in c# and not being used as a COM interop.I need to use this dll as a reference in vb6.I got an error while adding the refrence "Can't add a reference to the specified file"?

By using command promt for registering i got an error " The module was loaded but the entry-point DllRegisterServer was not found. Make sure that it is a valid DLL or OCX file and then try again."

You cannot directly do what you are asking. The only thing that VB6 can "register" is by definition a COM DLL.

If you are not able to modify the C# DLL to add COM interface elements, then alternatively you could write a wrapper in C# or VB (.net) which itself exposes a COM interface, and internally calls the original DLL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM