Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi!
I converted a VB6 project using VS2010 and got an Interop DLL along with the Project. Now i wish to call the certain methods from the DLL.
I tried generating the .tlb file using TlbImp so to use the same in RCW but cant, i get an error stating: not a valid type library.
I tried to check using OLEview if there is actually any .tlb file along with the Dll file or not but i get an error: Error Loading Type Library/Dll
Type_E_CantLoadLibrary($80029C4A)
At this point i dont know how to proceed? I desparately need help.
I am able to add the DLL as a reference, but cant access any of the functions, yet.
If i were to use Pinvoke, is there a tutorial for the same?

Thanks in advance!!
Posted
Updated 25-Jul-12 2:51am
v2
Comments
Sergey Alexandrovich Kryukov 25-Jul-12 12:17pm    
If you already went so far to use C++/CLI, what can possibly cause you to keep using VB6? Any particular reason? Why torturing yourself and nearly guarantee pure results, especially maintainability?
--SA
kash_sheetansh 27-Jul-12 9:26am    
the DLL in question was something i got with the VB6 project which came with the product. I just have to use the same in C++ to recreate it for/as per specific directives!

1 solution

If you have a vanilla dll you're calling, then you can use pinvoke if you get the code right. If you're writing the dll, you're better off using COM to get it to work with VB6, assuming you have no choice in that question.
 
Share this answer
 
Comments
kash_sheetansh 27-Jul-12 9:24am    
I got to tat considering your comment a little bit of my research. As a noob, my only question is what is a vanilla dll? i presume a DLL given with the product.

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