ntdll: Use single field for misc flags in ComClass redirection section.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d4c2b61c48
commit
72d055854b
|
@ -1422,9 +1422,7 @@ enum comclass_miscfields {
|
|||
|
||||
struct comclassredirect_data {
|
||||
ULONG size;
|
||||
BYTE res;
|
||||
BYTE miscmask;
|
||||
BYTE res1[2];
|
||||
ULONG flags;
|
||||
DWORD model;
|
||||
GUID clsid;
|
||||
GUID alias;
|
||||
|
@ -1481,12 +1479,9 @@ static void test_find_com_redirection(HANDLE handle, const GUID *clsid, const GU
|
|||
ok_(__FILE__, line)(comclass->size == sizeof(*comclass), "got %d for header size\n", comclass->size);
|
||||
if (data.lpData && comclass->size == sizeof(*comclass))
|
||||
{
|
||||
ULONG len, miscmask;
|
||||
WCHAR *ptr;
|
||||
ULONG len;
|
||||
|
||||
ok_(__FILE__, line)(comclass->res == 0, "got res as %d\n", comclass->res);
|
||||
ok_(__FILE__, line)(comclass->res1[0] == 0, "got res1[0] as %02x\n", comclass->res1[0]);
|
||||
ok_(__FILE__, line)(comclass->res1[1] == 0, "got res1[1] as %02x\n", comclass->res1[1]);
|
||||
ok_(__FILE__, line)(comclass->model == ThreadingModel_Neutral, "got model %d\n", comclass->model);
|
||||
ok_(__FILE__, line)(IsEqualGUID(&comclass->clsid, clsid), "got wrong clsid %s\n", wine_dbgstr_guid(&comclass->clsid));
|
||||
ok_(__FILE__, line)(IsEqualGUID(&comclass->clsid2, clsid), "got wrong clsid2 %s\n", wine_dbgstr_guid(&comclass->clsid2));
|
||||
|
@ -1519,19 +1514,21 @@ static void test_find_com_redirection(HANDLE handle, const GUID *clsid, const GU
|
|||
ok_(__FILE__, line)(data.ulSectionTotalLength > comclass->name_offset, "got wrong offset %d\n", comclass->name_offset);
|
||||
|
||||
/* check misc fields are set */
|
||||
if (comclass->miscmask)
|
||||
miscmask = (comclass->flags >> 8) & 0xff;
|
||||
if (miscmask)
|
||||
{
|
||||
if (comclass->miscmask & MiscStatus)
|
||||
if (miscmask & MiscStatus)
|
||||
ok_(__FILE__, line)(comclass->miscstatus != 0, "got miscstatus 0x%08x\n", comclass->miscstatus);
|
||||
if (comclass->miscmask & MiscStatusIcon)
|
||||
if (miscmask & MiscStatusIcon)
|
||||
ok_(__FILE__, line)(comclass->miscstatusicon != 0, "got miscstatusicon 0x%08x\n", comclass->miscstatusicon);
|
||||
if (comclass->miscmask & MiscStatusContent)
|
||||
if (miscmask & MiscStatusContent)
|
||||
ok_(__FILE__, line)(comclass->miscstatuscontent != 0, "got miscstatuscontent 0x%08x\n", comclass->miscstatuscontent);
|
||||
if (comclass->miscmask & MiscStatusThumbnail)
|
||||
if (miscmask & MiscStatusThumbnail)
|
||||
ok_(__FILE__, line)(comclass->miscstatusthumbnail != 0, "got miscstatusthumbnail 0x%08x\n", comclass->miscstatusthumbnail);
|
||||
if (comclass->miscmask & MiscStatusDocPrint)
|
||||
if (miscmask & MiscStatusDocPrint)
|
||||
ok_(__FILE__, line)(comclass->miscstatusdocprint != 0, "got miscstatusdocprint 0x%08x\n", comclass->miscstatusdocprint);
|
||||
}
|
||||
ok_(__FILE__, line)(!(comclass->flags & 0xffff00ff), "Unexpected flags %#x.\n", comclass->flags);
|
||||
|
||||
/* part used for clrClass only */
|
||||
if (comclass->clrdata_len)
|
||||
|
|
|
@ -74,9 +74,7 @@ struct dll_fixup
|
|||
struct comclassredirect_data
|
||||
{
|
||||
ULONG size;
|
||||
BYTE res;
|
||||
BYTE miscmask;
|
||||
BYTE res1[2];
|
||||
ULONG flags;
|
||||
DWORD model;
|
||||
GUID clsid;
|
||||
GUID alias;
|
||||
|
|
|
@ -242,9 +242,7 @@ enum comclass_miscfields
|
|||
struct comclassredirect_data
|
||||
{
|
||||
ULONG size;
|
||||
BYTE res;
|
||||
BYTE miscmask;
|
||||
BYTE res1[2];
|
||||
ULONG flags;
|
||||
DWORD model;
|
||||
GUID clsid;
|
||||
GUID alias;
|
||||
|
@ -4030,7 +4028,7 @@ static void add_comserver_record(const struct guidsection_header *section, const
|
|||
struct entity *entity = &entities->base[i];
|
||||
if (entity->kind == ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION)
|
||||
{
|
||||
ULONG module_len, progid_len, str_len = 0;
|
||||
ULONG module_len, progid_len, str_len = 0, miscmask;
|
||||
struct comclassredirect_data *data;
|
||||
struct guid_index *alias_index;
|
||||
struct clrclass_data *clrdata;
|
||||
|
@ -4064,9 +4062,6 @@ static void add_comserver_record(const struct guidsection_header *section, const
|
|||
/* setup data */
|
||||
data = (struct comclassredirect_data*)((BYTE*)section + (*index)->data_offset);
|
||||
data->size = sizeof(*data);
|
||||
data->res = 0;
|
||||
data->res1[0] = 0;
|
||||
data->res1[1] = 0;
|
||||
data->model = entity->u.comclass.model;
|
||||
data->clsid = (*index)->guid;
|
||||
data->alias = alias_index->guid;
|
||||
|
@ -4091,17 +4086,18 @@ static void add_comserver_record(const struct guidsection_header *section, const
|
|||
data->miscstatusdocprint = entity->u.comclass.miscstatusdocprint;
|
||||
|
||||
/* mask describes which misc* data is available */
|
||||
data->miscmask = 0;
|
||||
miscmask = 0;
|
||||
if (data->miscstatus)
|
||||
data->miscmask |= MiscStatus;
|
||||
miscmask |= MiscStatus;
|
||||
if (data->miscstatuscontent)
|
||||
data->miscmask |= MiscStatusContent;
|
||||
miscmask |= MiscStatusContent;
|
||||
if (data->miscstatusthumbnail)
|
||||
data->miscmask |= MiscStatusThumbnail;
|
||||
miscmask |= MiscStatusThumbnail;
|
||||
if (data->miscstatusicon)
|
||||
data->miscmask |= MiscStatusIcon;
|
||||
miscmask |= MiscStatusIcon;
|
||||
if (data->miscstatusdocprint)
|
||||
data->miscmask |= MiscStatusDocPrint;
|
||||
miscmask |= MiscStatusDocPrint;
|
||||
data->flags = miscmask << 8;
|
||||
|
||||
if (data->clrdata_offset)
|
||||
{
|
||||
|
|
|
@ -105,9 +105,7 @@ enum comclass_miscfields
|
|||
struct comclassredirect_data
|
||||
{
|
||||
ULONG size;
|
||||
BYTE res;
|
||||
BYTE miscmask;
|
||||
BYTE res1[2];
|
||||
ULONG flags;
|
||||
DWORD model;
|
||||
GUID clsid;
|
||||
GUID alias;
|
||||
|
@ -265,10 +263,11 @@ BOOL actctx_get_miscstatus(const CLSID *clsid, DWORD aspect, DWORD *status)
|
|||
{
|
||||
struct comclassredirect_data *comclass = (struct comclassredirect_data*)data.lpData;
|
||||
enum comclass_miscfields misc = dvaspect_to_miscfields(aspect);
|
||||
ULONG miscmask = (comclass->flags >> 8) & 0xff;
|
||||
|
||||
if (!(comclass->miscmask & misc))
|
||||
if (!(miscmask & misc))
|
||||
{
|
||||
if (!(comclass->miscmask & MiscStatus))
|
||||
if (!(miscmask & MiscStatus))
|
||||
{
|
||||
*status = 0;
|
||||
return TRUE;
|
||||
|
|
|
@ -64,9 +64,7 @@ typedef struct _SXS_GUID_INFORMATION_CLR
|
|||
struct comclassredirect_data
|
||||
{
|
||||
ULONG size;
|
||||
BYTE res;
|
||||
BYTE miscmask;
|
||||
BYTE res1[2];
|
||||
ULONG flags;
|
||||
DWORD model;
|
||||
GUID clsid;
|
||||
GUID alias;
|
||||
|
|
Loading…
Reference in New Issue