Register dll fails when tlb file not generated.

V

Vijay Chegu

Hi,

I have a 32bit ATL COM dll which is generated without the tlb(/notlb option set in

midl). When i register the dll i get following error : 0x80029C4AL

Winerror.h says
//
// MessageId: TYPE_E_CANTLOADLIBRARY
//
// MessageText:
//
// Error loading type library/DLL.
//
#define TYPE_E_CANTLOADLIBRARY _HRESULT_TYPEDEF_(0x80029C4AL)


But if i generate the same dll with tlb my application works fine. That is i am

able to register the dll.

My build & Target machine is as follows:

1)Windows 2000 Professional
2)VC++ .NET 2003 (v7.1)
3)Platform SDK April 2003


Any help will be greatly appreciated.

Thanx and regards,
Vijay Chegu
//vijaychegunotlbregistererror
 
H

Holger Grund

Vijay,

Vijay Chegu said:
I have a 32bit ATL COM dll which is generated without the tlb(/notlb option set in
midl). When i register the dll i get following error : 0x80029C4AL
You have to tell the ATL Framework not to register the Typelib.
You can do this by explicitly setting the parameter bRegTypeLib
to FALSE in the DllRegisterServer and DllUnregisterServer
entry points.

I.e.
STDAPI DllRegisterServer(void)
{
return _AtlModule.DllRegisterServer( FALSE);
}

-hg
 
A

Alexander Nickolov

Somewhere in the generated registration code it is set up to
register a type library in the resources. Don't know where it
is with attributes, but without attributes in VC 6.0 it was the
call to _Module.RegisterServer - the argument is set to TRUE
and you need to change it to FALSE. Same for UnregisterServer.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: (e-mail address removed)
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
 
V

Vijay Chegu

Thanx a lot

Holger Grund and Alexander Nickolov

That did the trick.

Thanx and Regards,
Vijay Chegu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top