Click here to Skip to main content
15,891,136 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: How to remove type library informationn from atl dll? Pin
Lim Bio Liong4-Nov-09 16:46
Lim Bio Liong4-Nov-09 16:46 
GeneralRe: How to remove type library informationn from atl dll? Pin
kcynic4-Nov-09 16:53
kcynic4-Nov-09 16:53 
GeneralRe: How to remove type library informationn from atl dll? Pin
Lim Bio Liong4-Nov-09 17:04
Lim Bio Liong4-Nov-09 17:04 
GeneralRe: How to remove type library informationn from atl dll? Pin
kcynic4-Nov-09 17:12
kcynic4-Nov-09 17:12 
GeneralRe: How to remove type library informationn from atl dll? Pin
Lim Bio Liong4-Nov-09 17:26
Lim Bio Liong4-Nov-09 17:26 
GeneralRe: How to remove type library informationn from atl dll? Pin
kcynic4-Nov-09 18:38
kcynic4-Nov-09 18:38 
GeneralRe: How to remove type library informationn from atl dll? Pin
kcynic2-Dec-09 19:08
kcynic2-Dec-09 19:08 
GeneralRe: How to remove type library informationn from atl dll? Pin
Lim Bio Liong2-Dec-09 23:24
Lim Bio Liong2-Dec-09 23:24 
Hello kcynic,

If you want to remove the type library information from your COM DLL and yet be able to register your COM DLL, the you need to do some more tweaking in your DllRegisterServer() code.

This function is generated for you by ATL and it generally looks like the following :

STDAPI DllRegisterServer(void)
{
      // registers object, typelib and all interfaces in typelib
      return _Module.RegisterServer(/*TRUE*/ FALSE);
}

Here, as suggested by my code above, comment out the TRUE value and insert in FALSE. The issue is that _Module.RegisterServer() will attempt to perform 2 things :

1. Writes information of the COM objects in your DLL into the registry.

2. Registers the type library (the *.tlb) file generated for you by the MIDL compiler into the registry.

In order to do (2), the type library binary must be part of the resource of your DLL. Now, if you do not wish to register your type library, the FALSE value of the parameter to _Module.RegisterServer() will specifically not register your type library.

- Bio.
GeneralRe: How to remove type library informationn from atl dll? Pin
kcynic3-Dec-09 2:19
kcynic3-Dec-09 2:19 
News[Message Deleted] Pin
Ahmed Charfeddine4-Nov-09 2:07
Ahmed Charfeddine4-Nov-09 2:07 
AnswerRe: How do you profile your C++ code ? Pin
Richard MacCutchan4-Nov-09 3:11
mveRichard MacCutchan4-Nov-09 3:11 
AnswerRe: How do you profile your C++ code ? Pin
Ahmed Charfeddine4-Nov-09 3:19
Ahmed Charfeddine4-Nov-09 3:19 
GeneralRe: How do you profile your C++ code ? Pin
Richard MacCutchan4-Nov-09 4:55
mveRichard MacCutchan4-Nov-09 4:55 
GeneralRe: How do you profile your C++ code ? Pin
Ahmed Charfeddine4-Nov-09 5:06
Ahmed Charfeddine4-Nov-09 5:06 
QuestionBitmap image in static control is flicker Pin
am 20093-Nov-09 22:15
am 20093-Nov-09 22:15 
Questionstd::copy question [modified] Pin
followait3-Nov-09 14:33
followait3-Nov-09 14:33 
AnswerRe: std::copy question Pin
Stuart Dootson3-Nov-09 23:40
professionalStuart Dootson3-Nov-09 23:40 
GeneralRe: std::copy question Pin
followait4-Nov-09 3:17
followait4-Nov-09 3:17 
QuestionHow to use WTL8 Wizard in VC6.0 ? Pin
wangningyu1-Nov-09 4:11
wangningyu1-Nov-09 4:11 
AnswerRe: How to use WTL8 Wizard in VC6.0 ? Pin
Stuart Dootson2-Nov-09 21:23
professionalStuart Dootson2-Nov-09 21:23 
GeneralRe: How to use WTL8 Wizard in VC6.0 ? Pin
wangningyu3-Nov-09 3:42
wangningyu3-Nov-09 3:42 
QuestionFiring a COM Event From Another Thread Pin
Rob Caldecott29-Oct-09 10:50
Rob Caldecott29-Oct-09 10:50 
AnswerRe: Firing a COM Event From Another Thread Pin
Lim Bio Liong1-Nov-09 23:53
Lim Bio Liong1-Nov-09 23:53 
AnswerRe: Firing a COM Event From Another Thread Pin
Roger Stoltz2-Nov-09 5:43
Roger Stoltz2-Nov-09 5:43 
AnswerRe: Firing a COM Event From Another Thread Pin
Lim Bio Liong2-Nov-09 18:50
Lim Bio Liong2-Nov-09 18:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.