Apply same magic to LibAttr.lcid from MSFT to SLTG

Dmitry Timoshkov dmitry at baikal.ru
Mon Nov 3 07:57:23 CST 2003


Hello,

This fixes a registration error of the native olepro32.

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    Apply same magic to LibAttr.lcid from MSFT to SLTG.

--- cvs/hq/wine/dlls/oleaut32/typelib.c	Mon Oct 20 13:17:18 2003
+++ wine/dlls/oleaut32/typelib.c	Mon Nov  3 20:12:34 2003
@@ -2180,7 +2180,7 @@ static ITypeLib2* ITypeLib2_Constructor_
     /*    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);
+      pTypeLibImpl->LibAttr.lcid = MAKELCID(MAKELANGID(PRIMARYLANGID(tlbHeader.lcid),0),0);
     else
       pTypeLibImpl->LibAttr.lcid = 0;
 
@@ -2425,7 +2425,10 @@ static DWORD SLTG_ReadLibBlk(LPVOID pLib
     pTypeLibImpl->LibAttr.syskind = *(WORD*)ptr;
     ptr += 2;
 
-    pTypeLibImpl->LibAttr.lcid = *(WORD*)ptr;
+    if(SUBLANGID(*(WORD*)ptr) == SUBLANG_NEUTRAL)
+        pTypeLibImpl->LibAttr.lcid = MAKELCID(MAKELANGID(PRIMARYLANGID(*(WORD*)ptr),0),0);
+    else
+        pTypeLibImpl->LibAttr.lcid = 0;
     ptr += 2;
 
     ptr += 4; /* skip res12 */






More information about the wine-patches mailing list