Andrew Eikum : oleaut32: Correct version byte order.

Alexandre Julliard julliard at winehq.org
Mon Aug 19 14:32:59 CDT 2013


Module: wine
Branch: master
Commit: f66523abeee8a64facf2c0ea35dc87ce7d5d6d58
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f66523abeee8a64facf2c0ea35dc87ce7d5d6d58

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Fri Aug 16 14:40:14 2013 -0500

oleaut32: Correct version byte order.

---

 dlls/oleaut32/tests/typelib.c |    6 +++++-
 dlls/oleaut32/typelib.c       |    2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c
index 8c5af1d..40359a2 100644
--- a/dlls/oleaut32/tests/typelib.c
+++ b/dlls/oleaut32/tests/typelib.c
@@ -3813,7 +3813,7 @@ static void test_create_typelib_lcid(LCID lcid)
     HRESULT hr;
     ICreateTypeLib2 *tl;
     HANDLE file;
-    DWORD msft_header[5]; /* five is enough for now */
+    DWORD msft_header[7];
     DWORD read;
 
     GetTempFileNameA( ".", "tlb", 0, filename );
@@ -3825,6 +3825,9 @@ static void test_create_typelib_lcid(LCID lcid)
     hr = ICreateTypeLib2_SetLcid(tl, lcid);
     ok(hr == S_OK, "got %08x\n", hr);
 
+    hr = ICreateTypeLib2_SetVersion(tl, 3, 4);
+    ok(hr == S_OK, "got %08x\n", hr);
+
     hr = ICreateTypeLib2_SaveAllChanges(tl);
     ok(hr == S_OK, "got %08x\n", hr);
 
@@ -3842,6 +3845,7 @@ static void test_create_typelib_lcid(LCID lcid)
     ok(msft_header[2] == 0xffffffff, "got %08x\n", msft_header[2]);
     ok(msft_header[3] == (lcid ? lcid : 0x409), "got %08x (lcid %08x)\n", msft_header[3], lcid);
     ok(msft_header[4] == lcid, "got %08x (lcid %08x)\n", msft_header[4], lcid);
+    ok(msft_header[6] == 0x00040003, "got %08x\n", msft_header[6]);
 
     DeleteFileA(filename);
 }
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index fa37737..48a698f 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -9703,7 +9703,7 @@ static HRESULT WINAPI ICreateTypeLib2_fnSaveAllChanges(ICreateTypeLib2 *iface)
         file.header.varflags |= 0x10;
     if (This->HelpStringDll)
         file.header.varflags |= HELPDLLFLAG;
-    file.header.version = (This->ver_major << 16) | This->ver_minor;
+    file.header.version = (This->ver_minor << 16) | This->ver_major;
     file.header.flags = This->libflags;
     file.header.helpstringcontext = 0; /* TODO - SetHelpStringContext not implemented yet */
     file.header.helpcontext = This->dwHelpContext;




More information about the wine-cvs mailing list