Commit fcba2723 authored by Ilya Basin's avatar Ilya Basin Committed by Alexandre Julliard

include: Fix packing bug in shlobj.h. pragma pack 8 for ITEMSPACING, CSFV, SFV_CREATE.

parent 61a9eef9
......@@ -1386,25 +1386,25 @@ static void test_pack_CIDA(void)
static void test_pack_CSFV(void)
{
/* CSFV (pack 1) */
/* CSFV (pack 8) */
TEST_FIELD_SIZE (CSFV, cbSize, 4)
TEST_FIELD_ALIGN (CSFV, cbSize, 1)
TEST_FIELD_ALIGN (CSFV, cbSize, 4)
TEST_FIELD_OFFSET(CSFV, cbSize, 0)
TEST_FIELD_SIZE (CSFV, pshf, 8)
TEST_FIELD_ALIGN (CSFV, pshf, 1)
TEST_FIELD_OFFSET(CSFV, pshf, 4)
TEST_FIELD_ALIGN (CSFV, pshf, 8)
TEST_FIELD_OFFSET(CSFV, pshf, 8)
TEST_FIELD_SIZE (CSFV, psvOuter, 8)
TEST_FIELD_ALIGN (CSFV, psvOuter, 1)
TEST_FIELD_OFFSET(CSFV, psvOuter, 12)
TEST_FIELD_ALIGN (CSFV, psvOuter, 8)
TEST_FIELD_OFFSET(CSFV, psvOuter, 16)
TEST_FIELD_SIZE (CSFV, pidl, 8)
TEST_FIELD_ALIGN (CSFV, pidl, 1)
TEST_FIELD_OFFSET(CSFV, pidl, 20)
TEST_FIELD_ALIGN (CSFV, pidl, 8)
TEST_FIELD_OFFSET(CSFV, pidl, 24)
TEST_FIELD_SIZE (CSFV, lEvents, 4)
TEST_FIELD_ALIGN (CSFV, lEvents, 1)
TEST_FIELD_OFFSET(CSFV, lEvents, 28)
TEST_FIELD_ALIGN (CSFV, lEvents, 4)
TEST_FIELD_OFFSET(CSFV, lEvents, 32)
TEST_FIELD_SIZE (CSFV, pfnCallback, 8)
TEST_FIELD_ALIGN (CSFV, pfnCallback, 1)
TEST_FIELD_OFFSET(CSFV, pfnCallback, 32)
TEST_FIELD_ALIGN (CSFV, pfnCallback, 8)
TEST_FIELD_OFFSET(CSFV, pfnCallback, 40)
}
static void test_pack_DROPFILES(void)
......@@ -1532,6 +1532,25 @@ static void test_pack_FILEGROUPDESCRIPTORW(void)
TEST_FIELD_OFFSET(FILEGROUPDESCRIPTORW, fgd, 4)
}
static void test_pack_ITEMSPACING(void)
{
/* ITEMSPACING (pack 8) */
TEST_TYPE_SIZE (ITEMSPACING, 16)
TEST_TYPE_ALIGN (ITEMSPACING, 4)
TEST_FIELD_SIZE (ITEMSPACING, cxSmall, 4)
TEST_FIELD_ALIGN (ITEMSPACING, cxSmall, 4)
TEST_FIELD_OFFSET(ITEMSPACING, cxSmall, 0)
TEST_FIELD_SIZE (ITEMSPACING, cySmall, 4)
TEST_FIELD_ALIGN (ITEMSPACING, cySmall, 4)
TEST_FIELD_OFFSET(ITEMSPACING, cySmall, 4)
TEST_FIELD_SIZE (ITEMSPACING, cxLarge, 4)
TEST_FIELD_ALIGN (ITEMSPACING, cxLarge, 4)
TEST_FIELD_OFFSET(ITEMSPACING, cxLarge, 8)
TEST_FIELD_SIZE (ITEMSPACING, cyLarge, 4)
TEST_FIELD_ALIGN (ITEMSPACING, cyLarge, 4)
TEST_FIELD_OFFSET(ITEMSPACING, cyLarge, 12)
}
static void test_pack_LPBROWSEINFOA(void)
{
/* LPBROWSEINFOA */
......@@ -1756,6 +1775,25 @@ static void test_pack_QCMINFO_IDMAP_PLACEMENT(void)
TEST_FIELD_OFFSET(QCMINFO_IDMAP_PLACEMENT, fFlags, 4)
}
static void test_pack_SFV_CREATE(void)
{
/* SFV_CREATE (pack 8) */
TEST_TYPE_SIZE (SFV_CREATE, 32)
TEST_TYPE_ALIGN (SFV_CREATE, 8)
TEST_FIELD_SIZE (SFV_CREATE, cbSize, 4)
TEST_FIELD_ALIGN (SFV_CREATE, cbSize, 4)
TEST_FIELD_OFFSET(SFV_CREATE, cbSize, 0)
TEST_FIELD_SIZE (SFV_CREATE, pshf, 8)
TEST_FIELD_ALIGN (SFV_CREATE, pshf, 8)
TEST_FIELD_OFFSET(SFV_CREATE, pshf, 8)
TEST_FIELD_SIZE (SFV_CREATE, psvOuter, 8)
TEST_FIELD_ALIGN (SFV_CREATE, psvOuter, 8)
TEST_FIELD_OFFSET(SFV_CREATE, psvOuter, 16)
TEST_FIELD_SIZE (SFV_CREATE, psfvcb, 8)
TEST_FIELD_ALIGN (SFV_CREATE, psfvcb, 8)
TEST_FIELD_OFFSET(SFV_CREATE, psfvcb, 24)
}
static void test_pack_SHChangeDWORDAsIDList(void)
{
/* SHChangeDWORDAsIDList (pack 1) */
......@@ -3166,24 +3204,24 @@ static void test_pack_CIDA(void)
static void test_pack_CSFV(void)
{
/* CSFV (pack 1) */
/* CSFV (pack 8) */
TEST_FIELD_SIZE (CSFV, cbSize, 4)
TEST_FIELD_ALIGN (CSFV, cbSize, 1)
TEST_FIELD_ALIGN (CSFV, cbSize, 4)
TEST_FIELD_OFFSET(CSFV, cbSize, 0)
TEST_FIELD_SIZE (CSFV, pshf, 4)
TEST_FIELD_ALIGN (CSFV, pshf, 1)
TEST_FIELD_ALIGN (CSFV, pshf, 4)
TEST_FIELD_OFFSET(CSFV, pshf, 4)
TEST_FIELD_SIZE (CSFV, psvOuter, 4)
TEST_FIELD_ALIGN (CSFV, psvOuter, 1)
TEST_FIELD_ALIGN (CSFV, psvOuter, 4)
TEST_FIELD_OFFSET(CSFV, psvOuter, 8)
TEST_FIELD_SIZE (CSFV, pidl, 4)
TEST_FIELD_ALIGN (CSFV, pidl, 1)
TEST_FIELD_ALIGN (CSFV, pidl, 4)
TEST_FIELD_OFFSET(CSFV, pidl, 12)
TEST_FIELD_SIZE (CSFV, lEvents, 4)
TEST_FIELD_ALIGN (CSFV, lEvents, 1)
TEST_FIELD_ALIGN (CSFV, lEvents, 4)
TEST_FIELD_OFFSET(CSFV, lEvents, 16)
TEST_FIELD_SIZE (CSFV, pfnCallback, 4)
TEST_FIELD_ALIGN (CSFV, pfnCallback, 1)
TEST_FIELD_ALIGN (CSFV, pfnCallback, 4)
TEST_FIELD_OFFSET(CSFV, pfnCallback, 20)
}
......@@ -3312,6 +3350,25 @@ static void test_pack_FILEGROUPDESCRIPTORW(void)
TEST_FIELD_OFFSET(FILEGROUPDESCRIPTORW, fgd, 4)
}
static void test_pack_ITEMSPACING(void)
{
/* ITEMSPACING (pack 8) */
TEST_TYPE_SIZE (ITEMSPACING, 16)
TEST_TYPE_ALIGN (ITEMSPACING, 4)
TEST_FIELD_SIZE (ITEMSPACING, cxSmall, 4)
TEST_FIELD_ALIGN (ITEMSPACING, cxSmall, 4)
TEST_FIELD_OFFSET(ITEMSPACING, cxSmall, 0)
TEST_FIELD_SIZE (ITEMSPACING, cySmall, 4)
TEST_FIELD_ALIGN (ITEMSPACING, cySmall, 4)
TEST_FIELD_OFFSET(ITEMSPACING, cySmall, 4)
TEST_FIELD_SIZE (ITEMSPACING, cxLarge, 4)
TEST_FIELD_ALIGN (ITEMSPACING, cxLarge, 4)
TEST_FIELD_OFFSET(ITEMSPACING, cxLarge, 8)
TEST_FIELD_SIZE (ITEMSPACING, cyLarge, 4)
TEST_FIELD_ALIGN (ITEMSPACING, cyLarge, 4)
TEST_FIELD_OFFSET(ITEMSPACING, cyLarge, 12)
}
static void test_pack_LPBROWSEINFOA(void)
{
/* LPBROWSEINFOA */
......@@ -3536,6 +3593,25 @@ static void test_pack_QCMINFO_IDMAP_PLACEMENT(void)
TEST_FIELD_OFFSET(QCMINFO_IDMAP_PLACEMENT, fFlags, 4)
}
static void test_pack_SFV_CREATE(void)
{
/* SFV_CREATE (pack 8) */
TEST_TYPE_SIZE (SFV_CREATE, 16)
TEST_TYPE_ALIGN (SFV_CREATE, 4)
TEST_FIELD_SIZE (SFV_CREATE, cbSize, 4)
TEST_FIELD_ALIGN (SFV_CREATE, cbSize, 4)
TEST_FIELD_OFFSET(SFV_CREATE, cbSize, 0)
TEST_FIELD_SIZE (SFV_CREATE, pshf, 4)
TEST_FIELD_ALIGN (SFV_CREATE, pshf, 4)
TEST_FIELD_OFFSET(SFV_CREATE, pshf, 4)
TEST_FIELD_SIZE (SFV_CREATE, psvOuter, 4)
TEST_FIELD_ALIGN (SFV_CREATE, psvOuter, 4)
TEST_FIELD_OFFSET(SFV_CREATE, psvOuter, 8)
TEST_FIELD_SIZE (SFV_CREATE, psfvcb, 4)
TEST_FIELD_ALIGN (SFV_CREATE, psfvcb, 4)
TEST_FIELD_OFFSET(SFV_CREATE, psfvcb, 12)
}
static void test_pack_SHChangeDWORDAsIDList(void)
{
/* SHChangeDWORDAsIDList (pack 1) */
......@@ -3682,6 +3758,7 @@ static void test_pack(void)
test_pack_HYPER_SIZEDARR();
test_pack_IID();
test_pack_ITEMIDLIST();
test_pack_ITEMSPACING();
test_pack_LPBLOB();
test_pack_LPBROWSEINFOA();
test_pack_LPBROWSEINFOW();
......@@ -3740,6 +3817,7 @@ static void test_pack(void)
test_pack_RemHMETAFILEPICT();
test_pack_RemHPALETTE();
test_pack_SCODE();
test_pack_SFV_CREATE();
test_pack_SHChangeDWORDAsIDList();
test_pack_SHChangeNotifyEntry();
test_pack_SHChangeProductKeyAsIDList();
......
......@@ -542,6 +542,8 @@ DECLARE_INTERFACE_(IShellFolderViewCB,IUnknown)
* IShellFolderView interface
*/
#include <pshpack8.h>
typedef struct _ITEMSPACING
{
int cxSmall;
......@@ -550,6 +552,8 @@ typedef struct _ITEMSPACING
int cyLarge;
} ITEMSPACING;
#include <poppack.h>
#define INTERFACE IShellFolderView
DEFINE_GUID(IID_IShellFolderView,0x37a378c0,0xf82d,0x11ce,0xae,0x65,0x08,0x00,0x2b,0x2e,0x12,0x62);
DECLARE_INTERFACE_(IShellFolderView, IUnknown)
......@@ -779,6 +783,8 @@ typedef HRESULT (CALLBACK *LPFNVIEWCALLBACK)(
WPARAM wParam,
LPARAM lParam);
#include <pshpack8.h>
typedef struct _CSFV
{
UINT cbSize;
......@@ -790,6 +796,8 @@ typedef struct _CSFV
FOLDERVIEWMODE fvm;
} CSFV, *LPCSFV;
#include <poppack.h>
HRESULT WINAPI SHCreateShellFolderViewEx(LPCSFV pshfvi, IShellView **ppshv);
/* SHCreateShellFolderViewEx callback messages */
......@@ -850,6 +858,8 @@ HRESULT WINAPI SHCreateShellFolderViewEx(LPCSFV pshfvi, IShellView **ppshv);
#define SFVM_GET_WEBVIEW_THEME 86 /* undocumented */
#define SFVM_GETDEFERREDVIEWSETTINGS 92 /* undocumented */
#include <pshpack8.h>
typedef struct _SFV_CREATE
{
UINT cbSize;
......@@ -858,6 +868,8 @@ typedef struct _SFV_CREATE
IShellFolderViewCB *psfvcb;
} SFV_CREATE;
#include <poppack.h>
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pscfv, IShellView **ppsv);
/* Types and definitions for the SFM_* parameters */
......
......@@ -1108,6 +1108,7 @@ IID
IShellChangeNotify
IShellIcon
ITEMIDLIST
ITEMSPACING
LPBLOB
LPBROWSEINFOA
LPBROWSEINFOW
......@@ -1167,6 +1168,7 @@ RemHGLOBAL
RemHMETAFILEPICT
RemHPALETTE
SCODE
SFV_CREATE
SHChangeDWORDAsIDList
SHChangeNotifyEntry
SHChangeProductKeyAsIDList
......
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