[SOLVED] Importing Type Library -> error lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- AMarchant · 2013-07-09 23:15 Hi I was able to import shdocvw using the Tools->Import Type Libary, which generated shdocvw_1_1_tlb.pas. I'm now attempting to do the same with MSHTML.dll, but when I use "Import Type Library", browse to the file in %SYSTEM% and click OK I get this error: QuoteError loading type library/dllhttp://img543.imageshack.us/img543/9393/pgno.png Having looked about a bit on Google it seems this error isn't specific to Lazarus/FPC, but probably handed on from the OS. I haven't been able to find anything to suggest a cure however. The operating system is Windows XP SP3, the MSHTML.dll file size is given as 6,014,976 bytes with version details 8.0.6001.23501. The error is returned instantly. The machine has 756MB RAM and 1.9GB of free hard disk space. Any idea what might be wrong? I was hoping - alternatively - that I might be able to find a copy of MSHTML_4_0_TLB online, but I've had no luck there either. Thank you in advance ---------------------------------------------------------------------- taazz · 2013-07-10 00:01 there are a number of already imported pas files on the net for example one of the oldest delphi MSHTML 4 imports can be found at http ://embeddedwb.cvs.sourceforge.net/viewvc/embeddedwb/Source/Mshtml_Ewb. pas?view=markup if that is not good enough then I'll have access to delphi 2007 tomorrow I can import it from a windows 7 32bit installation, although I doubt that it has changed at all over the years. ---------------------------------------------------------------------- ludob · 2013-07-10 01:52 Quote from: AMarchant on July 10, 2013, 01:15:52 amI'm now attempting to do the same with MSHTML.dll, but when I use "Import Type Library", browse to the file in %SYSTEM% and click OK I get this error: QuoteError loading type library/dllThis simply means that MSHTML.dll does not contain any type information. Some COM objects have the type library integrated in the dll or exe , some have the type library in a separate file with typically the .tlb extension. You'll normally find a MSHTML.tlb in the same dir where you found MSHTML.dll. Import that file. ---------------------------------------------------------------------- AMarchant · 2013-07-10 08:16 ludob, thank you so much, that makes things a lot clearer! As you say, MSHTML.tlb was also available in the System32 directory, and importing from this worked perfectly - apologies for my ignorance about this. taazz, that's a really kind offer, I'm glad I don't need to impose on you, but thank you for suggesting it.