Does a tlb file have an association architecture?
See the question and my original answer on StackOverflowType Library do contain a x86 vs x64 flag in the SYSKIND enumeration. In fact it even supports 16 bits Windows. It can be read using the ITypeLib::GetLibAttr method, something like this:
int _tmain(int argc, _TCHAR* argv[])
{
CoInitialize(NULL);
CComPtr<ITypeLib> tlb;
LoadTypeLib(L"C:\\myPath\\MyFile.tlb", &tlb);
TLIBATTR *patt;
tlb->GetLibAttr(&patt);
switch(patt->syskind)
{
case SYSKIND::SYS_WIN64:
printf("WIN64");
break;
case SYSKIND::SYS_WIN32:
printf("WIN32");
break;
case SYSKIND::SYS_WIN16:
printf("WIN16");
break;
}
tlb->ReleaseTLibAttr(patt);
CoUninitialize();
}
Note SYSKIND is not a flags, it's an enum, you don't have something like "any CPU" value.