Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d0bf7f4e
Commit
d0bf7f4e
authored
Nov 11, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Added activation context support for OleRegGetMiscStatus().
parent
4242c437
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
4 deletions
+79
-4
compobj.c
dlls/ole32/compobj.c
+74
-0
compobj_private.h
dlls/ole32/compobj_private.h
+2
-0
ole2.c
dlls/ole32/ole2.c
+2
-0
compobj.c
dlls/ole32/tests/compobj.c
+1
-4
No files found.
dlls/ole32/compobj.c
View file @
d0bf7f4e
...
@@ -99,6 +99,15 @@ enum comclass_threadingmodel
...
@@ -99,6 +99,15 @@ enum comclass_threadingmodel
ThreadingModel_Neutral
=
5
ThreadingModel_Neutral
=
5
};
};
enum
comclass_miscfields
{
MiscStatus
=
1
,
MiscStatusIcon
=
2
,
MiscStatusContent
=
4
,
MiscStatusThumbnail
=
8
,
MiscStatusDocPrint
=
16
};
struct
comclassredirect_data
struct
comclassredirect_data
{
{
ULONG
size
;
ULONG
size
;
...
@@ -218,6 +227,71 @@ static CRITICAL_SECTION_DEBUG class_cs_debug =
...
@@ -218,6 +227,71 @@ static CRITICAL_SECTION_DEBUG class_cs_debug =
};
};
static
CRITICAL_SECTION
csRegisteredClassList
=
{
&
class_cs_debug
,
-
1
,
0
,
0
,
0
,
0
};
static
CRITICAL_SECTION
csRegisteredClassList
=
{
&
class_cs_debug
,
-
1
,
0
,
0
,
0
,
0
};
static
inline
enum
comclass_miscfields
dvaspect_to_miscfields
(
DWORD
aspect
)
{
switch
(
aspect
)
{
case
DVASPECT_CONTENT
:
return
MiscStatusContent
;
case
DVASPECT_THUMBNAIL
:
return
MiscStatusThumbnail
;
case
DVASPECT_ICON
:
return
MiscStatusIcon
;
case
DVASPECT_DOCPRINT
:
return
MiscStatusDocPrint
;
default:
return
MiscStatus
;
};
}
BOOL
actctx_get_miscstatus
(
const
CLSID
*
clsid
,
DWORD
aspect
,
DWORD
*
status
)
{
ACTCTX_SECTION_KEYED_DATA
data
;
data
.
cbSize
=
sizeof
(
data
);
if
(
FindActCtxSectionGuid
(
0
,
NULL
,
ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION
,
clsid
,
&
data
))
{
struct
comclassredirect_data
*
comclass
=
(
struct
comclassredirect_data
*
)
data
.
lpData
;
enum
comclass_miscfields
misc
=
dvaspect_to_miscfields
(
aspect
);
if
(
!
(
comclass
->
miscmask
&
misc
))
{
if
(
!
(
comclass
->
miscmask
&
MiscStatus
))
{
*
status
=
0
;
return
TRUE
;
}
misc
=
MiscStatus
;
}
switch
(
misc
)
{
case
MiscStatus
:
*
status
=
comclass
->
miscstatus
;
break
;
case
MiscStatusIcon
:
*
status
=
comclass
->
miscstatusicon
;
break
;
case
MiscStatusContent
:
*
status
=
comclass
->
miscstatuscontent
;
break
;
case
MiscStatusThumbnail
:
*
status
=
comclass
->
miscstatusthumbnail
;
break
;
case
MiscStatusDocPrint
:
*
status
=
comclass
->
miscstatusdocprint
;
break
;
default:
;
};
return
TRUE
;
}
else
return
FALSE
;
}
/* wrapper for NtCreateKey that creates the key recursively if necessary */
/* wrapper for NtCreateKey that creates the key recursively if necessary */
static
NTSTATUS
create_key
(
HKEY
*
retkey
,
ACCESS_MASK
access
,
OBJECT_ATTRIBUTES
*
attr
)
static
NTSTATUS
create_key
(
HKEY
*
retkey
,
ACCESS_MASK
access
,
OBJECT_ATTRIBUTES
*
attr
)
{
{
...
...
dlls/ole32/compobj_private.h
View file @
d0bf7f4e
...
@@ -315,6 +315,8 @@ extern UINT ole_private_data_clipboard_format DECLSPEC_HIDDEN;
...
@@ -315,6 +315,8 @@ extern UINT ole_private_data_clipboard_format DECLSPEC_HIDDEN;
extern
LSTATUS
create_classes_key
(
HKEY
,
const
WCHAR
*
,
REGSAM
,
HKEY
*
)
DECLSPEC_HIDDEN
;
extern
LSTATUS
create_classes_key
(
HKEY
,
const
WCHAR
*
,
REGSAM
,
HKEY
*
)
DECLSPEC_HIDDEN
;
extern
LSTATUS
open_classes_key
(
HKEY
,
const
WCHAR
*
,
REGSAM
,
HKEY
*
)
DECLSPEC_HIDDEN
;
extern
LSTATUS
open_classes_key
(
HKEY
,
const
WCHAR
*
,
REGSAM
,
HKEY
*
)
DECLSPEC_HIDDEN
;
extern
BOOL
actctx_get_miscstatus
(
const
CLSID
*
,
DWORD
,
DWORD
*
)
DECLSPEC_HIDDEN
;
static
inline
void
*
heap_alloc
(
size_t
len
)
static
inline
void
*
heap_alloc
(
size_t
len
)
{
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
return
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
...
...
dlls/ole32/ole2.c
View file @
d0bf7f4e
...
@@ -895,6 +895,8 @@ HRESULT WINAPI OleRegGetMiscStatus(
...
@@ -895,6 +895,8 @@ HRESULT WINAPI OleRegGetMiscStatus(
*
pdwStatus
=
0
;
*
pdwStatus
=
0
;
if
(
actctx_get_miscstatus
(
clsid
,
dwAspect
,
pdwStatus
))
return
S_OK
;
/*
/*
* Open the class id Key
* Open the class id Key
*/
*/
...
...
dlls/ole32/tests/compobj.c
View file @
d0bf7f4e
...
@@ -1889,21 +1889,18 @@ static void test_OleRegGetMiscStatus(void)
...
@@ -1889,21 +1889,18 @@ static void test_OleRegGetMiscStatus(void)
{
{
status
=
0
;
status
=
0
;
hr
=
OleRegGetMiscStatus
(
&
CLSID_Testclass
,
DVASPECT_ICON
,
&
status
);
hr
=
OleRegGetMiscStatus
(
&
CLSID_Testclass
,
DVASPECT_ICON
,
&
status
);
todo_wine
{
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
status
==
OLEMISC_RECOMPOSEONRESIZE
,
"got 0x%08x
\n
"
,
status
);
ok
(
status
==
OLEMISC_RECOMPOSEONRESIZE
,
"got 0x%08x
\n
"
,
status
);
}
/* context data takes precedence over registration info */
/* context data takes precedence over registration info */
status
=
0
;
status
=
0
;
hr
=
OleRegGetMiscStatus
(
&
CLSID_StdFont
,
DVASPECT_ICON
,
&
status
);
hr
=
OleRegGetMiscStatus
(
&
CLSID_StdFont
,
DVASPECT_ICON
,
&
status
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
status
==
OLEMISC_RECOMPOSEONRESIZE
,
"got 0x%08x
\n
"
,
status
);
ok
(
status
==
OLEMISC_RECOMPOSEONRESIZE
,
"got 0x%08x
\n
"
,
status
);
/* there's no such attribute in context */
/* there's no such attribute in context */
status
=
-
1
;
status
=
-
1
;
hr
=
OleRegGetMiscStatus
(
&
CLSID_Testclass
,
DVASPECT_DOCPRINT
,
&
status
);
hr
=
OleRegGetMiscStatus
(
&
CLSID_Testclass
,
DVASPECT_DOCPRINT
,
&
status
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
status
==
0
,
"got 0x%08x
\n
"
,
status
);
ok
(
status
==
0
,
"got 0x%08x
\n
"
,
status
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment