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
ec52a1f5
Commit
ec52a1f5
authored
Jan 16, 2015
by
Qian Hong
Committed by
Alexandre Julliard
Jan 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atl: Improved content type handling of AtlAxCreateControlEx.
parent
189ffc2e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
65 additions
and
22 deletions
+65
-22
Makefile.in
dlls/atl/Makefile.in
+1
-1
atl_ax.c
dlls/atl/atl_ax.c
+56
-13
Makefile.in
dlls/atl100/Makefile.in
+1
-1
atl.c
dlls/atl100/tests/atl.c
+4
-4
Makefile.in
dlls/atl110/Makefile.in
+1
-1
Makefile.in
dlls/atl80/Makefile.in
+1
-1
Makefile.in
dlls/atl90/Makefile.in
+1
-1
No files found.
dlls/atl/Makefile.in
View file @
ec52a1f5
MODULE
=
atl.dll
MODULE
=
atl.dll
IMPORTLIB
=
atl
IMPORTLIB
=
atl
IMPORTS
=
uuid oleaut32 ole32 user32 gdi32 advapi32
IMPORTS
=
uuid oleaut32 ole32 user32 gdi32 advapi32
shlwapi
EXTRADEFS
=
-D_ATL_VER
=
_ATL_VER_30
EXTRADEFS
=
-D_ATL_VER
=
_ATL_VER_30
C_SRCS
=
\
C_SRCS
=
\
...
...
dlls/atl/atl_ax.c
View file @
ec52a1f5
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include "atlbase.h"
#include "atlbase.h"
#include "atliface.h"
#include "atliface.h"
#include "atlwin.h"
#include "atlwin.h"
#include "shlwapi.h"
#include "wine/unicode.h"
#include "wine/unicode.h"
...
@@ -991,6 +992,48 @@ HRESULT WINAPI AtlAxCreateControl(LPCOLESTR lpszName, HWND hWnd,
...
@@ -991,6 +992,48 @@ HRESULT WINAPI AtlAxCreateControl(LPCOLESTR lpszName, HWND hWnd,
NULL
,
NULL
,
NULL
);
NULL
,
NULL
,
NULL
);
}
}
enum
content
{
IsEmpty
=
0
,
IsGUID
=
1
,
IsHTML
=
2
,
IsURL
=
3
,
IsUnknown
=
4
};
static
enum
content
get_content_type
(
LPCOLESTR
name
,
CLSID
*
control_id
)
{
WCHAR
new_urlW
[
MAX_PATH
];
DWORD
size
=
MAX_PATH
;
WCHAR
mshtml_prefixW
[]
=
{
'm'
,
's'
,
'h'
,
't'
,
'm'
,
'l'
,
':'
,
'\0'
};
if
(
!
name
||
!
name
[
0
])
{
WARN
(
"name %s
\n
"
,
wine_dbgstr_w
(
name
));
return
IsEmpty
;
}
if
(
CLSIDFromString
(
name
,
control_id
)
==
S_OK
||
CLSIDFromProgID
(
name
,
control_id
)
==
S_OK
)
return
IsGUID
;
if
(
PathIsURLW
(
name
)
||
UrlApplySchemeW
(
name
,
new_urlW
,
&
size
,
URL_APPLY_GUESSSCHEME
|
URL_APPLY_GUESSFILE
)
==
S_OK
)
{
*
control_id
=
CLSID_WebBrowser
;
return
IsURL
;
}
if
(
!
strncmpiW
(
name
,
mshtml_prefixW
,
7
))
{
FIXME
(
"mshtml prefix not implemented
\n
"
);
*
control_id
=
CLSID_WebBrowser
;
return
IsHTML
;
}
return
IsUnknown
;
}
/***********************************************************************
/***********************************************************************
* AtlAxCreateControlEx [atl100.@]
* AtlAxCreateControlEx [atl100.@]
*
*
...
@@ -1005,24 +1048,24 @@ HRESULT WINAPI AtlAxCreateControlEx(LPCOLESTR lpszName, HWND hWnd,
...
@@ -1005,24 +1048,24 @@ HRESULT WINAPI AtlAxCreateControlEx(LPCOLESTR lpszName, HWND hWnd,
CLSID
controlId
;
CLSID
controlId
;
HRESULT
hRes
;
HRESULT
hRes
;
IOleObject
*
pControl
;
IOleObject
*
pControl
;
IUnknown
*
pUnkControl
;
IUnknown
*
pUnkControl
=
NULL
;
IPersistStreamInit
*
pPSInit
;
IPersistStreamInit
*
pPSInit
;
IUnknown
*
pContainer
;
IUnknown
*
pContainer
=
NULL
;
enum
{
IsGUID
=
0
,
IsHTML
=
1
,
IsURL
=
2
}
content
;
enum
content
content
;
TRACE
(
"(%s %p %p %p %p %p %p)
\n
"
,
debugstr_w
(
lpszName
),
hWnd
,
pStream
,
TRACE
(
"(%s %p %p %p %p %p %p)
\n
"
,
debugstr_w
(
lpszName
),
hWnd
,
pStream
,
ppUnkContainer
,
ppUnkControl
,
iidSink
,
punkSink
);
ppUnkContainer
,
ppUnkControl
,
iidSink
,
punkSink
);
hRes
=
CLSIDFromString
(
lpszName
,
&
controlId
)
;
if
(
ppUnkContainer
)
*
ppUnkContainer
=
NULL
;
if
(
FAILED
(
hRes
)
)
if
(
ppUnkControl
)
*
ppUnkControl
=
NULL
;
hRes
=
CLSIDFromProgID
(
lpszName
,
&
controlId
);
if
(
SUCCEEDED
(
hRes
)
)
content
=
get_content_type
(
lpszName
,
&
controlId
);
content
=
IsGUID
;
else
{
if
(
content
==
IsEmpty
)
/* FIXME - check for MSHTML: prefix! */
return
S_OK
;
content
=
IsURL
;
controlId
=
CLSID_WebBrowser
;
if
(
content
==
IsUnknown
)
}
return
CO_E_CLASSSTRING
;
hRes
=
CoCreateInstance
(
&
controlId
,
0
,
CLSCTX_ALL
,
&
IID_IOleObject
,
hRes
=
CoCreateInstance
(
&
controlId
,
0
,
CLSCTX_ALL
,
&
IID_IOleObject
,
(
void
**
)
&
pControl
);
(
void
**
)
&
pControl
);
...
...
dlls/atl100/Makefile.in
View file @
ec52a1f5
MODULE
=
atl100.dll
MODULE
=
atl100.dll
IMPORTLIB
=
atl100
IMPORTLIB
=
atl100
IMPORTS
=
uuid ole32 oleaut32 user32 gdi32 advapi32
IMPORTS
=
uuid ole32 oleaut32 user32 gdi32 advapi32
shlwapi
EXTRADEFS
=
-D_ATL_VER
=
_ATL_VER_100
EXTRADEFS
=
-D_ATL_VER
=
_ATL_VER_100
PARENTSRC
=
../atl
PARENTSRC
=
../atl
...
...
dlls/atl100/tests/atl.c
View file @
ec52a1f5
...
@@ -643,8 +643,8 @@ static void test_ax_win(void)
...
@@ -643,8 +643,8 @@ static void test_ax_win(void)
ok
(
hwnd
!=
NULL
,
"CreateWindow failed!
\n
"
);
ok
(
hwnd
!=
NULL
,
"CreateWindow failed!
\n
"
);
control
=
(
IUnknown
*
)
0xdeadbeef
;
control
=
(
IUnknown
*
)
0xdeadbeef
;
res
=
AtlAxGetControl
(
hwnd
,
&
control
);
res
=
AtlAxGetControl
(
hwnd
,
&
control
);
todo_wine
ok
(
res
==
E_FAIL
,
"Expected E_FAIL, returned %08x
\n
"
,
res
);
ok
(
res
==
E_FAIL
,
"Expected E_FAIL, returned %08x
\n
"
,
res
);
todo_wine
ok
(
!
control
,
"returned %p
\n
"
,
control
);
ok
(
!
control
,
"returned %p
\n
"
,
control
);
if
(
control
)
IUnknown_Release
(
control
);
if
(
control
)
IUnknown_Release
(
control
);
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
...
@@ -652,8 +652,8 @@ static void test_ax_win(void)
...
@@ -652,8 +652,8 @@ static void test_ax_win(void)
ok
(
hwnd
!=
NULL
,
"CreateWindow failed!
\n
"
);
ok
(
hwnd
!=
NULL
,
"CreateWindow failed!
\n
"
);
control
=
(
IUnknown
*
)
0xdeadbeef
;
control
=
(
IUnknown
*
)
0xdeadbeef
;
res
=
AtlAxGetControl
(
hwnd
,
&
control
);
res
=
AtlAxGetControl
(
hwnd
,
&
control
);
todo_wine
ok
(
res
==
E_FAIL
,
"Expected E_FAIL, returned %08x
\n
"
,
res
);
ok
(
res
==
E_FAIL
,
"Expected E_FAIL, returned %08x
\n
"
,
res
);
todo_wine
ok
(
!
control
,
"returned %p
\n
"
,
control
);
ok
(
!
control
,
"returned %p
\n
"
,
control
);
if
(
control
)
IUnknown_Release
(
control
);
if
(
control
)
IUnknown_Release
(
control
);
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
...
...
dlls/atl110/Makefile.in
View file @
ec52a1f5
MODULE
=
atl110.dll
MODULE
=
atl110.dll
IMPORTS
=
oleaut32 ole32 user32 gdi32 advapi32 uuid
IMPORTS
=
oleaut32 ole32 user32 gdi32 advapi32 uuid
shlwapi
EXTRADEFS
=
-D_ATL_VER
=
_ATL_VER_110
EXTRADEFS
=
-D_ATL_VER
=
_ATL_VER_110
PARENTSRC
=
../atl
PARENTSRC
=
../atl
...
...
dlls/atl80/Makefile.in
View file @
ec52a1f5
MODULE
=
atl80.dll
MODULE
=
atl80.dll
IMPORTLIB
=
atl80
IMPORTLIB
=
atl80
IMPORTS
=
oleaut32 user32 ole32 gdi32 advapi32 uuid
IMPORTS
=
oleaut32 user32 ole32 gdi32 advapi32 uuid
shlwapi
EXTRADEFS
=
-D_ATL_VER
=
_ATL_VER_80
EXTRADEFS
=
-D_ATL_VER
=
_ATL_VER_80
PARENTSRC
=
../atl
PARENTSRC
=
../atl
...
...
dlls/atl90/Makefile.in
View file @
ec52a1f5
MODULE
=
atl90.dll
MODULE
=
atl90.dll
IMPORTS
=
oleaut32 user32 ole32 gdi32 advapi32 uuid
IMPORTS
=
oleaut32 user32 ole32 gdi32 advapi32 uuid
shlwapi
EXTRADEFS
=
-D_ATL_VER
=
_ATL_VER_90
EXTRADEFS
=
-D_ATL_VER
=
_ATL_VER_90
PARENTSRC
=
../atl
PARENTSRC
=
../atl
...
...
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