There are the steps to follow:
1) Create a class library in VS choose whatever language you want either Vb.NEt or C#
2) Go to to Project Properties->ConfigurationProperties->build, check the Register for Com Interop check box. This creates the COM wrapper for your .NET assembly and hence need not use regasm.
3) Write whatever code you want, expose the classes publicly, expose the properties, functions you want publicly.
Now in your VB project, add the claslibrary.tlb created by the above program.
Now use the classes and functions as you want.
you should not have any problem.
OR
When you deploy a .NET DLL, and you want to use it with COM (such as VB),
you need to register it with "Regasm.exe your_aseembly_file /codebase".
you need to include the /codebase switch when registing assembly in folders
other than GAC.
To use the /codebase switch, the assembly must be strongly-named
No comments:
Post a Comment