Subj : Re: LoadTypeLib Error Message TYPE_E_CANTLOAD.. To : borland.public.cpp.borlandcpp From : Mohsen Date : Fri Mar 04 2005 06:47 am >Considering it is a Windows function, and resides in a Microsoft DLL, >I'd say the odds are the bug is in your code (or is a bug in MS's >code). > >You might find more people who know/care/use OLE in an OLE/ActiveX >newsgroup. > > > Dear Bob, I've collected many proofs to show myself that it does not work on Borland C++ 5.02. These are the following: 1. I've tried to change the target of AUTOGEN from 16 to 32 bit and the same problem showed up. I tried to restrict the code but it did not help. 2. When I change the target of the code to 16 bit it works but in 32 bit it does not. 3. I downloaded some code fragments from Microsoft. They also included compiled EXE files. When I compile them using bcc32 they don't work, but when I run the original EXE files they work. The file are included in self extraction file TLBDBG.EXE. 4. The code that I run is the following // // Win32 // #include #include int main(int argc, char* argv[]) { CoInitialize(0); ITypeLib* typeLib; HRESULT hr = LoadTypeLib((wchar_t *)argv[1], typeLib); . . . CoUninitialize(); } Mohsen .