Commit 96a5c442 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Fix packing of shlwapi.h

Add a DECLSPEC_ALIGN(8) to force DLLVERSIONINFO2 to have the correct alignment.
parent 4c1438a7
......@@ -129,22 +129,22 @@ static void test_pack_DLLGETVERSIONPROC(void)
static void test_pack_DLLVERSIONINFO(void)
{
/* DLLVERSIONINFO (pack 1) */
TEST_TYPE(DLLVERSIONINFO, 20, 1);
TEST_FIELD(DLLVERSIONINFO, DWORD, cbSize, 0, 4, 1);
TEST_FIELD(DLLVERSIONINFO, DWORD, dwMajorVersion, 4, 4, 1);
TEST_FIELD(DLLVERSIONINFO, DWORD, dwMinorVersion, 8, 4, 1);
TEST_FIELD(DLLVERSIONINFO, DWORD, dwBuildNumber, 12, 4, 1);
TEST_FIELD(DLLVERSIONINFO, DWORD, dwPlatformID, 16, 4, 1);
/* DLLVERSIONINFO (pack 8) */
TEST_TYPE(DLLVERSIONINFO, 20, 4);
TEST_FIELD(DLLVERSIONINFO, DWORD, cbSize, 0, 4, 4);
TEST_FIELD(DLLVERSIONINFO, DWORD, dwMajorVersion, 4, 4, 4);
TEST_FIELD(DLLVERSIONINFO, DWORD, dwMinorVersion, 8, 4, 4);
TEST_FIELD(DLLVERSIONINFO, DWORD, dwBuildNumber, 12, 4, 4);
TEST_FIELD(DLLVERSIONINFO, DWORD, dwPlatformID, 16, 4, 4);
}
static void test_pack_DLLVERSIONINFO2(void)
{
/* DLLVERSIONINFO2 (pack 1) */
TEST_TYPE(DLLVERSIONINFO2, 32, 1);
TEST_FIELD(DLLVERSIONINFO2, DLLVERSIONINFO, info1, 0, 20, 1);
TEST_FIELD(DLLVERSIONINFO2, DWORD, dwFlags, 20, 4, 1);
TEST_FIELD(DLLVERSIONINFO2, ULONGLONG, ullVersion, 24, 8, 1);
/* DLLVERSIONINFO2 (pack 8) */
TEST_TYPE(DLLVERSIONINFO2, 32, 8);
TEST_FIELD(DLLVERSIONINFO2, DLLVERSIONINFO, info1, 0, 20, 4);
TEST_FIELD(DLLVERSIONINFO2, DWORD, dwFlags, 20, 4, 4);
TEST_FIELD(DLLVERSIONINFO2, ULONGLONG, ullVersion, 24, 8, 8);
}
static void test_pack_HUSKEY(void)
......
......@@ -28,7 +28,7 @@
extern "C" {
#endif /* defined(__cplusplus) */
#include <pshpack1.h>
#include <pshpack8.h>
#ifndef NO_SHLWAPI_REG
......@@ -926,7 +926,7 @@ typedef HRESULT (CALLBACK *DLLGETVERSIONPROC)(DLLVERSIONINFO *);
typedef struct _DLLVERSIONINFO2 {
DLLVERSIONINFO info1;
DWORD dwFlags; /* Reserved */
ULONGLONG ullVersion; /* 16 bits each for Major, Minor, Build, QFE */
ULONGLONG DECLSPEC_ALIGN(8) ullVersion; /* 16 bits each for Major, Minor, Build, QFE */
} DLLVERSIONINFO2;
#define DLLVER_MAJOR_MASK 0xFFFF000000000000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment