Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
821aae4f
Commit
821aae4f
authored
Oct 30, 2006
by
Andrey Turkin
Committed by
Alexandre Julliard
Nov 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atl: Implement AtlAxCreateControl and AtlAxCreateControlEx.
parent
b7ec4de7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
130 additions
and
13 deletions
+130
-13
Makefile.in
dlls/atl/Makefile.in
+1
-1
atl.spec
dlls/atl/atl.spec
+1
-1
atl_ax.c
dlls/atl/atl_ax.c
+125
-1
atl_main.c
dlls/atl/atl_main.c
+0
-10
atlbase.h
dlls/atl/atlbase.h
+2
-0
atliface.idl
dlls/atl/atliface.idl
+1
-0
No files found.
dlls/atl/Makefile.in
View file @
821aae4f
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
atl.dll
MODULE
=
atl.dll
IMPORTLIB
=
libatl.
$(IMPLIBEXT)
IMPORTLIB
=
libatl.
$(IMPLIBEXT)
IMPORTS
=
ole32 shlwapi user32 gdi32 advapi32 kernel32
IMPORTS
=
ole32
oleaut32
shlwapi user32 gdi32 advapi32 kernel32
EXTRALIBS
=
-luuid
EXTRALIBS
=
-luuid
C_SRCS
=
\
C_SRCS
=
\
...
...
dlls/atl/atl.spec
View file @
821aae4f
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
37 stub AtlAxCreateDialogW
37 stub AtlAxCreateDialogW
38 stub AtlAxCreateDialogA
38 stub AtlAxCreateDialogA
39 stdcall AtlAxCreateControl(ptr ptr ptr ptr)
39 stdcall AtlAxCreateControl(ptr ptr ptr ptr)
40 st
ub AtlAxCreateControlEx
40 st
dcall AtlAxCreateControlEx(ptr ptr ptr ptr ptr ptr ptr)
41 stub AtlAxAttachControl
41 stub AtlAxAttachControl
42 stdcall AtlAxWinInit()
42 stdcall AtlAxWinInit()
43 stdcall AtlModuleAddCreateWndData(ptr ptr ptr)
43 stdcall AtlModuleAddCreateWndData(ptr ptr ptr)
...
...
dlls/atl/atl_ax.c
View file @
821aae4f
...
@@ -53,7 +53,7 @@ LRESULT static CALLBACK AtlAxWin_wndproc( HWND hWnd, UINT wMsg, WPARAM wParam, L
...
@@ -53,7 +53,7 @@ LRESULT static CALLBACK AtlAxWin_wndproc( HWND hWnd, UINT wMsg, WPARAM wParam, L
if
(
!
ptr
)
if
(
!
ptr
)
return
1
;
return
1
;
GetWindowTextW
(
hWnd
,
ptr
,
len
);
GetWindowTextW
(
hWnd
,
ptr
,
len
);
AtlAxCreateControl
(
ptr
,
hWnd
,
NULL
,
NULL
);
AtlAxCreateControl
Ex
(
ptr
,
hWnd
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
ptr
);
HeapFree
(
GetProcessHeap
(),
0
,
ptr
);
return
0
;
return
0
;
}
}
...
@@ -97,3 +97,127 @@ BOOL WINAPI AtlAxWinInit(void)
...
@@ -97,3 +97,127 @@ BOOL WINAPI AtlAxWinInit(void)
return
TRUE
;
return
TRUE
;
}
}
/***********************************************************************
* AtlAxCreateControl [ATL.@]
*/
HRESULT
WINAPI
AtlAxCreateControl
(
LPCOLESTR
lpszName
,
HWND
hWnd
,
IStream
*
pStream
,
IUnknown
**
ppUnkContainer
)
{
return
AtlAxCreateControlEx
(
lpszName
,
hWnd
,
pStream
,
ppUnkContainer
,
NULL
,
NULL
,
NULL
);
}
/***********************************************************************
* AtlAxCreateControlEx [ATL.@]
*
* REMARKS
* See http://www.codeproject.com/com/cwebpage.asp for some background
*
*/
HRESULT
WINAPI
AtlAxCreateControlEx
(
LPCOLESTR
lpszName
,
HWND
hWnd
,
IStream
*
pStream
,
IUnknown
**
ppUnkContainer
,
IUnknown
**
ppUnkControl
,
REFIID
iidSink
,
IUnknown
*
punkSink
)
{
CLSID
controlId
;
HRESULT
hRes
;
IOleObject
*
pControl
;
IUnknown
*
pUnkControl
;
IPersistStreamInit
*
pPSInit
;
IUnknown
*
pContainer
;
enum
{
IsGUID
=
0
,
IsHTML
=
1
,
IsURL
=
2
}
content
;
TRACE
(
"(%s %p %p %p %p %p %p)
\n
"
,
debugstr_w
(
lpszName
),
hWnd
,
pStream
,
ppUnkContainer
,
ppUnkControl
,
iidSink
,
punkSink
);
hRes
=
CLSIDFromString
(
(
LPOLESTR
)
lpszName
,
&
controlId
);
if
(
FAILED
(
hRes
)
)
hRes
=
CLSIDFromProgID
(
lpszName
,
&
controlId
);
if
(
SUCCEEDED
(
hRes
)
)
content
=
IsGUID
;
else
{
/* FIXME - check for MSHTML: prefix! */
content
=
IsURL
;
memcpy
(
&
controlId
,
&
CLSID_WebBrowser
,
sizeof
(
controlId
)
);
}
hRes
=
CoCreateInstance
(
&
controlId
,
0
,
CLSCTX_ALL
,
&
IID_IOleObject
,
(
void
**
)
&
pControl
);
if
(
FAILED
(
hRes
)
)
{
WARN
(
"cannot create ActiveX control %s instance - error 0x%08x
\n
"
,
debugstr_guid
(
&
controlId
),
hRes
);
return
hRes
;
}
hRes
=
IOleObject_QueryInterface
(
pControl
,
&
IID_IPersistStreamInit
,
(
void
**
)
&
pPSInit
);
if
(
SUCCEEDED
(
hRes
)
)
{
if
(
!
pStream
)
IPersistStreamInit_InitNew
(
pPSInit
);
else
IPersistStreamInit_Load
(
pPSInit
,
pStream
);
IPersistStreamInit_Release
(
pPSInit
);
}
else
WARN
(
"cannot get IID_IPersistStreamInit out of control
\n
"
);
IOleObject_QueryInterface
(
pControl
,
&
IID_IUnknown
,
(
void
**
)
&
pUnkControl
);
IOleObject_Release
(
pControl
);
hRes
=
AtlAxAttachControl
(
pUnkControl
,
hWnd
,
&
pContainer
);
if
(
FAILED
(
hRes
)
)
WARN
(
"cannot attach control to window
\n
"
);
if
(
content
==
IsURL
)
{
IWebBrowser2
*
browser
;
hRes
=
IOleObject_QueryInterface
(
pControl
,
&
IID_IWebBrowser2
,
(
void
**
)
&
browser
);
if
(
!
browser
)
WARN
(
"Cannot query IWebBrowser2 interface: %08x
\n
"
,
hRes
);
else
{
VARIANT
url
;
IWebBrowser2_put_Visible
(
browser
,
VARIANT_TRUE
);
/* it seems that native does this on URL (but do not on MSHTML:! why? */
V_VT
(
&
url
)
=
VT_BSTR
;
V_BSTR
(
&
url
)
=
SysAllocString
(
lpszName
);
hRes
=
IWebBrowser2_Navigate2
(
browser
,
&
url
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
FAILED
(
hRes
)
)
WARN
(
"IWebBrowser2::Navigate2 failed: %08x
\n
"
,
hRes
);
SysFreeString
(
V_BSTR
(
&
url
)
);
IWebBrowser2_Release
(
browser
);
}
}
if
(
ppUnkContainer
)
{
*
ppUnkContainer
=
pContainer
;
if
(
pContainer
)
IUnknown_AddRef
(
pContainer
);
}
if
(
ppUnkControl
)
{
*
ppUnkControl
=
pUnkControl
;
if
(
pUnkControl
)
IUnknown_AddRef
(
pUnkControl
);
}
IUnknown_Release
(
pUnkControl
);
if
(
pContainer
)
IUnknown_Release
(
pContainer
);
return
S_OK
;
}
/***********************************************************************
* AtlAxAttachControl [ATL.@]
*/
HRESULT
WINAPI
AtlAxAttachControl
(
IUnknown
*
pControl
,
HWND
hWnd
,
IUnknown
**
ppUnkContainer
)
{
FIXME
(
"(%p %p %p) - stub
\n
"
,
pControl
,
hWnd
,
ppUnkContainer
);
return
E_NOTIMPL
;
}
dlls/atl/atl_main.c
View file @
821aae4f
...
@@ -347,16 +347,6 @@ HRESULT WINAPI AtlModuleUnregisterServer(_ATL_MODULEW *pm, const CLSID *clsid)
...
@@ -347,16 +347,6 @@ HRESULT WINAPI AtlModuleUnregisterServer(_ATL_MODULEW *pm, const CLSID *clsid)
}
}
/***********************************************************************
/***********************************************************************
* AtlAxCreateControl [ATL.@]
*/
HRESULT
WINAPI
AtlAxCreateControl
(
LPCOLESTR
lpszName
,
HWND
hWnd
,
IStream
*
pStream
,
IUnknown
**
ppUnkContainer
)
{
FIXME
(
"%s %p %p %p)
\n
"
,
debugstr_w
(
lpszName
),
hWnd
,
pStream
,
ppUnkContainer
);
return
E_NOTIMPL
;
}
/***********************************************************************
* AtlModuleRegisterWndClassInfoW [ATL.@]
* AtlModuleRegisterWndClassInfoW [ATL.@]
*
*
* PARAMS
* PARAMS
...
...
dlls/atl/atlbase.h
View file @
821aae4f
...
@@ -142,7 +142,9 @@ struct _ATL_REGMAP_ENTRY
...
@@ -142,7 +142,9 @@ struct _ATL_REGMAP_ENTRY
};
};
HRESULT
WINAPI
AtlAdvise
(
IUnknown
*
pUnkCP
,
IUnknown
*
pUnk
,
const
IID
*
iid
,
LPDWORD
dpw
);
HRESULT
WINAPI
AtlAdvise
(
IUnknown
*
pUnkCP
,
IUnknown
*
pUnk
,
const
IID
*
iid
,
LPDWORD
dpw
);
HRESULT
WINAPI
AtlAxAttachControl
(
IUnknown
*
,
HWND
,
IUnknown
**
);
HRESULT
WINAPI
AtlAxCreateControl
(
LPCOLESTR
,
HWND
,
IStream
*
,
IUnknown
**
);
HRESULT
WINAPI
AtlAxCreateControl
(
LPCOLESTR
,
HWND
,
IStream
*
,
IUnknown
**
);
HRESULT
WINAPI
AtlAxCreateControlEx
(
LPCOLESTR
,
HWND
,
IStream
*
,
IUnknown
**
,
IUnknown
**
,
REFIID
,
IUnknown
*
);
HRESULT
WINAPI
AtlFreeMarshalStream
(
IStream
*
pStream
);
HRESULT
WINAPI
AtlFreeMarshalStream
(
IStream
*
pStream
);
HRESULT
WINAPI
AtlInternalQueryInterface
(
LPVOID
pThis
,
const
_ATL_INTMAP_ENTRY
*
pEntries
,
REFIID
iid
,
LPVOID
*
ppvObject
);
HRESULT
WINAPI
AtlInternalQueryInterface
(
LPVOID
pThis
,
const
_ATL_INTMAP_ENTRY
*
pEntries
,
REFIID
iid
,
LPVOID
*
ppvObject
);
HRESULT
WINAPI
AtlMarshalPtrInProc
(
IUnknown
*
pUnk
,
const
IID
*
iid
,
IStream
**
ppStream
);
HRESULT
WINAPI
AtlMarshalPtrInProc
(
IUnknown
*
pUnk
,
const
IID
*
iid
,
IStream
**
ppStream
);
...
...
dlls/atl/atliface.idl
View file @
821aae4f
...
@@ -71,4 +71,5 @@ interface IRegistrar : IUnknown
...
@@ -71,4 +71,5 @@ interface IRegistrar : IUnknown
cpp_quote
(
"DEFINE_GUID(CLSID_ATLRegistrar,0x44ec053a,0x400f,0x11d0,0x9d,0xcd,0x00,0xa0,0xc9,0x03,0x91,0xd3);"
)
cpp_quote
(
"DEFINE_GUID(CLSID_ATLRegistrar,0x44ec053a,0x400f,0x11d0,0x9d,0xcd,0x00,0xa0,0xc9,0x03,0x91,0xd3);"
)
cpp_quote
(
"HRESULT WINAPI AtlAxCreateControl(LPCOLESTR,HWND,IStream*,IUnknown**);"
)
cpp_quote
(
"HRESULT WINAPI AtlAxCreateControl(LPCOLESTR,HWND,IStream*,IUnknown**);"
)
cpp_quote
(
"HRESULT WINAPI AtlAxCreateControlEx(LPCOLESTR,HWND,IStream*,IUnknown**,IUnknown**,REFIID,IUnknown*);"
)
cpp_quote
(
"BOOL WINAPI AtlAxWinInit(void);"
)
cpp_quote
(
"BOOL WINAPI AtlAxWinInit(void);"
)
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