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
6756049b
Commit
6756049b
authored
Jan 15, 2015
by
Qian Hong
Committed by
Alexandre Julliard
Jan 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atl: Don't conflict GWLP_USERDATA with user applications.
parent
e1999c2a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
atl_ax.c
dlls/atl/atl_ax.c
+7
-5
atl.c
dlls/atl100/tests/atl.c
+1
-1
No files found.
dlls/atl/atl_ax.c
View file @
6756049b
...
@@ -55,6 +55,8 @@ typedef struct IOCS {
...
@@ -55,6 +55,8 @@ typedef struct IOCS {
BOOL
fActive
,
fInPlace
,
fWindowless
;
BOOL
fActive
,
fInPlace
,
fWindowless
;
}
IOCS
;
}
IOCS
;
static
const
WCHAR
wine_atl_iocsW
[]
=
{
'_'
,
'_'
,
'W'
,
'I'
,
'N'
,
'E'
,
'_'
,
'A'
,
'T'
,
'L'
,
'_'
,
'I'
,
'O'
,
'C'
,
'S'
,
'\0'
};
/**********************************************************************
/**********************************************************************
* AtlAxWin class window procedure
* AtlAxWin class window procedure
*/
*/
...
@@ -150,7 +152,7 @@ static HRESULT IOCS_Detach( IOCS *This ) /* remove subclassing */
...
@@ -150,7 +152,7 @@ static HRESULT IOCS_Detach( IOCS *This ) /* remove subclassing */
if
(
This
->
hWnd
)
if
(
This
->
hWnd
)
{
{
SetWindowLongPtrW
(
This
->
hWnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
This
->
OrigWndProc
);
SetWindowLongPtrW
(
This
->
hWnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
This
->
OrigWndProc
);
SetWindowLongPtrW
(
This
->
hWnd
,
GWLP_USERDATA
,
0
);
RemovePropW
(
This
->
hWnd
,
wine_atl_iocsW
);
This
->
hWnd
=
NULL
;
This
->
hWnd
=
NULL
;
}
}
if
(
This
->
control
)
if
(
This
->
control
)
...
@@ -906,7 +908,7 @@ static LRESULT IOCS_OnWndProc( IOCS *This, HWND hWnd, UINT uMsg, WPARAM wParam,
...
@@ -906,7 +908,7 @@ static LRESULT IOCS_OnWndProc( IOCS *This, HWND hWnd, UINT uMsg, WPARAM wParam,
static
LRESULT
CALLBACK
AtlHost_wndproc
(
HWND
hWnd
,
UINT
wMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
LRESULT
CALLBACK
AtlHost_wndproc
(
HWND
hWnd
,
UINT
wMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
IOCS
*
This
=
(
IOCS
*
)
Get
WindowLongPtrW
(
hWnd
,
GWLP_USERDATA
);
IOCS
*
This
=
(
IOCS
*
)
Get
PropW
(
hWnd
,
wine_atl_iocsW
);
return
IOCS_OnWndProc
(
This
,
hWnd
,
wMsg
,
wParam
,
lParam
);
return
IOCS_OnWndProc
(
This
,
hWnd
,
wMsg
,
wParam
,
lParam
);
}
}
...
@@ -915,7 +917,7 @@ static HRESULT IOCS_Attach( IOCS *This, HWND hWnd, IUnknown *pUnkControl ) /* su
...
@@ -915,7 +917,7 @@ static HRESULT IOCS_Attach( IOCS *This, HWND hWnd, IUnknown *pUnkControl ) /* su
This
->
hWnd
=
hWnd
;
This
->
hWnd
=
hWnd
;
IUnknown_QueryInterface
(
pUnkControl
,
&
IID_IOleObject
,
(
void
**
)
&
This
->
control
);
IUnknown_QueryInterface
(
pUnkControl
,
&
IID_IOleObject
,
(
void
**
)
&
This
->
control
);
IOleObject_SetClientSite
(
This
->
control
,
&
This
->
IOleClientSite_iface
);
IOleObject_SetClientSite
(
This
->
control
,
&
This
->
IOleClientSite_iface
);
Set
WindowLongPtrW
(
hWnd
,
GWLP_USERDATA
,
(
ULONG_PTR
)
This
);
Set
PropW
(
hWnd
,
wine_atl_iocsW
,
This
);
This
->
OrigWndProc
=
(
WNDPROC
)
SetWindowLongPtrW
(
hWnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
AtlHost_wndproc
);
This
->
OrigWndProc
=
(
WNDPROC
)
SetWindowLongPtrW
(
hWnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
AtlHost_wndproc
);
return
S_OK
;
return
S_OK
;
...
@@ -1328,7 +1330,7 @@ HRESULT WINAPI AtlAxGetHost(HWND hWnd, IUnknown **host)
...
@@ -1328,7 +1330,7 @@ HRESULT WINAPI AtlAxGetHost(HWND hWnd, IUnknown **host)
*
host
=
NULL
;
*
host
=
NULL
;
This
=
(
IOCS
*
)
Get
WindowLongPtrW
(
hWnd
,
GWLP_USERDATA
);
This
=
(
IOCS
*
)
Get
PropW
(
hWnd
,
wine_atl_iocsW
);
if
(
!
This
)
if
(
!
This
)
{
{
WARN
(
"No container attached to %p
\n
"
,
hWnd
);
WARN
(
"No container attached to %p
\n
"
,
hWnd
);
...
@@ -1350,7 +1352,7 @@ HRESULT WINAPI AtlAxGetControl(HWND hWnd, IUnknown **pUnk)
...
@@ -1350,7 +1352,7 @@ HRESULT WINAPI AtlAxGetControl(HWND hWnd, IUnknown **pUnk)
*
pUnk
=
NULL
;
*
pUnk
=
NULL
;
This
=
(
IOCS
*
)
Get
WindowLongPtrW
(
hWnd
,
GWLP_USERDATA
);
This
=
(
IOCS
*
)
Get
PropW
(
hWnd
,
wine_atl_iocsW
);
if
(
!
This
||
!
This
->
control
)
if
(
!
This
||
!
This
->
control
)
{
{
WARN
(
"No control attached to %p
\n
"
,
hWnd
);
WARN
(
"No control attached to %p
\n
"
,
hWnd
);
...
...
dlls/atl100/tests/atl.c
View file @
6756049b
...
@@ -845,7 +845,7 @@ static void test_AtlAxAttachControl(void)
...
@@ -845,7 +845,7 @@ static void test_AtlAxAttachControl(void)
ok
(
hr
==
S_OK
,
"Expected AtlAxAttachControl to return S_OK, got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected AtlAxAttachControl to return S_OK, got 0x%08x
\n
"
,
hr
);
ok
(
container
!=
NULL
,
"Expected not NULL!
\n
"
);
ok
(
container
!=
NULL
,
"Expected not NULL!
\n
"
);
val
=
GetWindowLongW
(
hwnd
,
GWLP_USERDATA
);
val
=
GetWindowLongW
(
hwnd
,
GWLP_USERDATA
);
todo_wine
ok
(
val
==
0xdeadbeef
,
"Expected unchanged, returned %08x
\n
"
,
val
);
ok
(
val
==
0xdeadbeef
,
"Expected unchanged, returned %08x
\n
"
,
val
);
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
IUnknown_Release
(
control
);
IUnknown_Release
(
control
);
...
...
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