AfxOleUnregisterTypeLib cannot handle win64 typelibs - by R. de Vreede

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 636148 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/14/2011 7:48:10 AM
Access Restriction Public


One can creat win32 and win64 typelibs. They are nicely registrated under keys win32 and win64 example:




However unregistering one of the two typelibs removes also the other.

The bug is in ctlreg.cpp which defines only 

#define TYPELIBWIN   _T("win32")
#define TYPELIBWIN_2 _T("win16")

and doesn't know anything about win64. 

As a sample I added a project open it and choose x64 release.
Choose debug->start debugging, typelib will be registrated win64.
Got to win 32 release and choose debug->start debugging, idem win32.
Now choose x64 debug. Put a breakpoint on AfxOleUnregisterTypeLib in graphics.cpp
Verify with regedit both entries are there. The location I already mentioned above.
Now choose debug->start debugging. Program will halt at breakpoint. Trace from there on and watch both the entries disappear.
This means that after testing installation (which always include a uninstallation) deployment projects I loose my registry entries which make life difficult if I start with a project depending on this typelibs

Sign in to post a comment.
Posted by Microsoft on 1/16/2011 at 10:08 PM
Thanks for your feedback.
We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by R. de Vreede on 1/14/2011 at 8:21 AM
By the way I do not why you do not use the UnregisterTypeLib funtion:

First use GetLibAttr and the yse the results for UnregisterTypeLib

That makes life a lot easier

Posted by Microsoft on 1/14/2011 at 7:59 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(