Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ C++/CLI COM Interop
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 25-Jul-12 2:11am
Comments
PrafullaVedante at 25-Jul-12 10:54am
   
Try using only tlbimp interopx.dll
Richard MacCutchan at 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 at 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 at 26-Jul-12 9:26am
   
thanks fragmentic. tats really helpful. Just one question, this is Pinvoke rite?
Fragmentic at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 9,108
1 OriginalGriff 8,186
2 CPallini 2,613
3 Richard MacCutchan 2,231
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 25 Jul 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100