Partager via


Bitness of the loaded typelibrary

If you use LoadTypeLib or LoadTypeLibEx then Ole Automation always convert the typelibrary according to the process bitness. So if we load a 32 bit typelibrary using LoadTypeLib/LoadTypeLibEx in a 64 bit process then it will be automagically converted to a 64 bit typelib in memory and vice versa.

As you may see that this is a one time perf hit but also enables users who for some reasons (best known to them) are unable to obtain a 64 bit or 32 bit typelibrary. Also, note that by definition ITyepLib::GetLibAttr would always show the persisted bitness of the typelibrary (i.e. the one present on the disk).