Click here to Skip to main content
15,936,903 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I create a dll in visual basic 2008 but when trying to register on a computer with Visual Basic 6.0 (regsvr32), throw an error about a missing module.

Please help
Updated 29-Jun-11 5:05am

Read this article, make sure you have implemented all of the required steps

Exposing .NET Components to COM[^]
Share this answer
pepito del puerto 29-Jun-11 13:07pm    
I will try this method, I mention the results when I have it
Sergey Alexandrovich Kryukov 30-Jun-11 19:00pm    
That is the solution, my 5.

However, an alternative solution exists: direct export as unmanaged. Don't say it is impossible; please first read my solution and referenced articles -- very interesting.

It seems that you're library uses a control or .DLL that isn't present on the customer machines. What external .DLL's is your library using?
Share this answer
pepito del puerto 29-Jun-11 13:04pm    
My dll doesn't use any other dll, only the code of the class itself
Dave Kreskowiak 29-Jun-11 13:15pm    
Did you register your .DLL on the client machine with REGASM?? RegSvr32 doesn't work on .NET COM-exposed .DLL's.
Packaging .NET assembly as COM component works, but it has many downsides. There are more effective techniques which allows to directly export managed methods as unmanaged, so the .NET assembly could be used by the unmanaged code like any other unmanaged DLL, for example, by VB.

It is commonly believed that this is impossible. But this is not true. It is only impossible in C# or VB.NET, but quite possible using IL assembler; and this is a part of CLR ECMA and ISO standards, not like any dirty trick.

So, the idea is to use a special attribute to mark the methods to be exported as unmanaged. The code is complied by VB.NET or C#, disassembled; then the IL code is modified according to the attributes and assembled again. This is automated using the MSBuild custom step, so no knowledge of IL assembler is required.

You can find the solution in the following CodeProject articles:
Unmanaged code can wrap managed methods[^],
How to Automate Exporting .NET Function to Unmanaged Programs[^].

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900