diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index e98cf1c781d..949a1a78b2a 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -2009,7 +2009,14 @@ static ITypeLib2* ITypeLib2_Constructor_MSFT(LPVOID pLib, DWORD dwTLBLength) /* now fill our internal data */ /* TLIBATTR fields */ MSFT_ReadGuid(&pTypeLibImpl->LibAttr.guid, tlbHeader.posguid, &cx); - pTypeLibImpl->LibAttr.lcid = tlbHeader.lcid; + + /* pTypeLibImpl->LibAttr.lcid = tlbHeader.lcid;*/ + /* Windows seems to have zero here, is this correct? */ + if(SUBLANGID(tlbHeader.lcid) == SUBLANG_NEUTRAL) + pTypeLibImpl->LibAttr.lcid = PRIMARYLANGID(tlbHeader.lcid); + else + pTypeLibImpl->LibAttr.lcid = 0; + pTypeLibImpl->LibAttr.syskind = tlbHeader.varflags & 0x0f; /* check the mask */ pTypeLibImpl->LibAttr.wMajorVerNum = LOWORD(tlbHeader.version); pTypeLibImpl->LibAttr.wMinorVerNum = HIWORD(tlbHeader.version);