Click here to Skip to main content
15,885,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi!

I tried to use tlbimp to generate a type library, the following way:

tlbimp interopx.dll /out: newinteropx.tlb **

the resulting error was: ...\interopx.dll is not a valid type library.

this is an interop dll of a VB6 project. I build the project and updated the DLL file. I moved the interopx.dll to the tlbimp folder and then called tlbimp(**with the above mentioned command).

Frankly speaking i cant understand what to do at this point?

Thanks in advance!!
Posted
Comments
PrafullaVedante 25-Jul-12 10:54am    
Try using only tlbimp interopx.dll
Richard MacCutchan 25-Jul-12 11:08am    
\interopx.dll is not a valid type library.
I think that message should give you a clue that you have a problem with your source. If it's not built in the correct format then there is not much you can do about it. Maybe you should contact the person or company that produced it.
Fragmentic 26-Jul-12 0:27am    
I had the same problem when wrapped dll of not COM type. I found solution in loading dll through interop, even it was win32 lib, it included without any wrappers, like:
[System.Runtime.InteropServices.DllImport("user32.dll", CharSet = System.Runtime.InteropServices.CharSet.Auto, CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
public static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint cButtons, uint dwExtraInfo);
kash_sheetansh 26-Jul-12 9:26am    
thanks fragmentic. tats really helpful. Just one question, this is Pinvoke rite?
Fragmentic 26-Jul-12 22:43pm    
Yep

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