Thanks Ben,
I have followed your approach and I think there is no typelib embedded in
the DLL. I am not using ATL and MFC, and developing unmanaged native C++ COM
DLL from scratch.
In my situation, how to generate type library? I am using Visual Studio 2005.
regards,
George
"Ben Voigt [C++ MVP]" wrote:
>
> "George" <(E-Mail Removed)> wrote in message
> news:7D44BE94-6CB1-4A7B-8DDF-(E-Mail Removed)...
> > Thanks Brian,
> >
> >
> > When using OLEView to open the native unmanaged COM DLL, there is an error
> > message.
> >
> > LoadTypeLib (c:\temp\foo.dll) failed.
> >
> > Error loading type library/DLL.
> >
> > TYPE_E_CANTLOADLIBRARY ($80029C4A)
> >
> > Do you know what is wrong?
>
> Looks like the type library is not embedded in the DLL. To verify, open the
> DLL in Visual Studio's resource editor, if there are any type libraries they
> will show up as custom resources of class "TYPELIB".
>
>
> >
> >
> > regards,
> > George
> >
> > "Brian Muth" wrote:
> >
> >>
> >> "George" <(E-Mail Removed)> wrote in message
> >> news:B334F3B5-E321-4580-BD7E-(E-Mail Removed)...
> >> > Hello everyone,
> >> >
> >> >
> >> > I find that we can use tlbexp command like *tlbexp <dll name>* to
> >> > export tlb
> >> > file for a C# COM assembly, but can not use it to export tlb file for
> >> > an
> >> > unmanaged C++ COM DLL. Is that correct?
> >>
> >> Correct.
> >>
> >> >
> >> > I am wondering how to export tlb file of an unmanaged C++ COM DLL?
> >>
> >> Not all COM DLL's have a type library. If one exists, it might be a
> >> separate file or it may be embedded as a resource. You can find
> >> out by using Oleview. Click on "File", "View Typelib..." and opening the
> >> DLL.
> >>
> >> Brian
> >>
> >>
> >>
>
>
>
|