Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
dbbcbd59
Commit
dbbcbd59
authored
14 years ago
by
Jacek Caban
Committed by
Alexandre Julliard
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
mshtml: Added beginning support for loading data by an ActiveX object.
parent
e7cb2d35
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/mshtml/npplugin.c
+8
-8
8 additions, 8 deletions
dlls/mshtml/npplugin.c
dlls/mshtml/pluginhost.c
+80
-1
80 additions, 1 deletion
dlls/mshtml/pluginhost.c
dlls/mshtml/pluginhost.h
+3
-1
3 additions, 1 deletion
dlls/mshtml/pluginhost.h
with
91 additions
and
10 deletions
dlls/mshtml/npplugin.c
+
8
−
8
View file @
dbbcbd59
...
...
@@ -203,31 +203,30 @@ static BOOL get_elem_clsid(nsIDOMElement *elem, CLSID *clsid)
return
ret
;
}
static
IUnknown
*
create_activex_object
(
HTMLWindow
*
window
,
nsIDOMElement
*
nselem
)
static
IUnknown
*
create_activex_object
(
HTMLWindow
*
window
,
nsIDOMElement
*
nselem
,
CLSID
*
clsid
)
{
IClassFactoryEx
*
cfex
;
IClassFactory
*
cf
;
IUnknown
*
obj
;
DWORD
policy
;
CLSID
guid
;
HRESULT
hres
;
if
(
!
get_elem_clsid
(
nselem
,
&
gu
id
))
{
if
(
!
get_elem_clsid
(
nselem
,
cls
id
))
{
WARN
(
"Could not determine element CLSID
\n
"
);
return
NULL
;
}
TRACE
(
"clsid %s
\n
"
,
debugstr_guid
(
&
gu
id
));
TRACE
(
"clsid %s
\n
"
,
debugstr_guid
(
cls
id
));
policy
=
0
;
hres
=
IInternetHostSecurityManager_ProcessUrlAction
(
HOSTSECMGR
(
window
->
doc
),
URLACTION_ACTIVEX_RUN
,
(
BYTE
*
)
&
policy
,
sizeof
(
policy
),
(
BYTE
*
)
&
gu
id
,
sizeof
(
GUID
),
0
,
0
);
(
BYTE
*
)
&
policy
,
sizeof
(
policy
),
(
BYTE
*
)
cls
id
,
sizeof
(
GUID
),
0
,
0
);
if
(
FAILED
(
hres
)
||
policy
!=
URLPOLICY_ALLOW
)
{
WARN
(
"ProcessUrlAction returned %08x %x
\n
"
,
hres
,
policy
);
return
NULL
;
}
hres
=
CoGetClassObject
(
&
gu
id
,
CLSCTX_INPROC_SERVER
|
CLSCTX_LOCAL_SERVER
,
NULL
,
&
IID_IClassFactory
,
(
void
**
)
&
cf
);
hres
=
CoGetClassObject
(
cls
id
,
CLSCTX_INPROC_SERVER
|
CLSCTX_LOCAL_SERVER
,
NULL
,
&
IID_IClassFactory
,
(
void
**
)
&
cf
);
if
(
FAILED
(
hres
))
return
NULL
;
...
...
@@ -250,6 +249,7 @@ static NPError CDECL NPP_New(NPMIMEType pluginType, NPP instance, UINT16 mode, I
nsIDOMElement
*
nselem
;
HTMLWindow
*
window
;
IUnknown
*
obj
;
CLSID
clsid
;
NPError
err
=
NPERR_NO_ERROR
;
TRACE
(
"(%s %p %x %d %p %p %p)
\n
"
,
debugstr_a
(
pluginType
),
instance
,
mode
,
argc
,
argn
,
argv
,
saved
);
...
...
@@ -267,12 +267,12 @@ static NPError CDECL NPP_New(NPMIMEType pluginType, NPP instance, UINT16 mode, I
return
NPERR_GENERIC_ERROR
;
}
obj
=
create_activex_object
(
window
,
nselem
);
obj
=
create_activex_object
(
window
,
nselem
,
&
clsid
);
if
(
obj
)
{
PluginHost
*
host
;
HRESULT
hres
;
hres
=
create_plugin_host
(
window
->
doc
,
nselem
,
obj
,
&
host
);
hres
=
create_plugin_host
(
window
->
doc
,
nselem
,
obj
,
&
clsid
,
&
host
);
nsIDOMElement_Release
(
nselem
);
IUnknown_Release
(
obj
);
if
(
SUCCEEDED
(
hres
))
...
...
This diff is collapsed.
Click to expand it.
dlls/mshtml/pluginhost.c
+
80
−
1
View file @
dbbcbd59
...
...
@@ -39,6 +39,81 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
const
IID
IID_HTMLPluginContainer
=
{
0xbd7a6050
,
0xb373
,
0x4f6f
,{
0xa4
,
0x93
,
0xdd
,
0x40
,
0xc5
,
0x23
,
0xa8
,
0x6a
}};
static
BOOL
check_load_safety
(
PluginHost
*
host
)
{
DWORD
policy_size
,
policy
;
struct
CONFIRMSAFETY
cs
;
BYTE
*
ppolicy
;
HRESULT
hres
;
cs
.
clsid
=
host
->
clsid
;
cs
.
pUnk
=
host
->
plugin_unk
;
cs
.
dwFlags
=
CONFIRMSAFETYACTION_LOADOBJECT
;
hres
=
IInternetHostSecurityManager_QueryCustomPolicy
(
HOSTSECMGR
(
host
->
doc
),
&
GUID_CUSTOM_CONFIRMOBJECTSAFETY
,
&
ppolicy
,
&
policy_size
,
(
BYTE
*
)
&
cs
,
sizeof
(
cs
),
0
);
if
(
FAILED
(
hres
))
return
FALSE
;
policy
=
*
(
DWORD
*
)
ppolicy
;
CoTaskMemFree
(
ppolicy
);
return
policy
==
URLPOLICY_ALLOW
;
}
static
HRESULT
create_prop_bag
(
IPropertyBag
**
ret
)
{
*
ret
=
NULL
;
return
S_OK
;
}
static
void
load_prop_bag
(
PluginHost
*
host
,
IPersistPropertyBag
*
persist_prop_bag
)
{
IPropertyBag
*
prop_bag
;
HRESULT
hres
;
hres
=
create_prop_bag
(
&
prop_bag
);
if
(
FAILED
(
hres
))
return
;
if
(
prop_bag
&&
!
check_load_safety
(
host
))
{
IPropertyBag_Release
(
prop_bag
);
prop_bag
=
NULL
;
}
if
(
prop_bag
)
{
hres
=
IPersistPropertyBag_Load
(
persist_prop_bag
,
prop_bag
,
NULL
);
IPropertyBag_Release
(
prop_bag
);
if
(
FAILED
(
hres
))
WARN
(
"Load failed: %08x
\n
"
,
hres
);
}
else
{
hres
=
IPersistPropertyBag_InitNew
(
persist_prop_bag
);
if
(
FAILED
(
hres
))
WARN
(
"InitNew failed: %08x
\n
"
,
hres
);
}
}
static
void
load_plugin
(
PluginHost
*
host
)
{
IPersistPropertyBag2
*
persist_prop_bag2
;
IPersistPropertyBag
*
persist_prop_bag
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
host
->
plugin_unk
,
&
IID_IPersistPropertyBag2
,
(
void
**
)
&
persist_prop_bag2
);
if
(
SUCCEEDED
(
hres
))
{
FIXME
(
"Use IPersistPropertyBag2 iface
\n
"
);
IPersistPropertyBag2_Release
(
persist_prop_bag2
);
return
;
}
hres
=
IUnknown_QueryInterface
(
host
->
plugin_unk
,
&
IID_IPersistPropertyBag
,
(
void
**
)
&
persist_prop_bag
);
if
(
SUCCEEDED
(
hres
))
{
load_prop_bag
(
host
,
persist_prop_bag
);
IPersistPropertyBag_Release
(
persist_prop_bag
);
return
;
}
FIXME
(
"No IPersistPeropertyBag iface
\n
"
);
}
static
void
activate_plugin
(
PluginHost
*
host
)
{
IClientSecurity
*
client_security
;
...
...
@@ -74,7 +149,10 @@ static void activate_plugin(PluginHost *host)
FIXME
(
"QuickActivate failed: %08x
\n
"
,
hres
);
}
else
{
FIXME
(
"No IQuickActivate
\n
"
);
return
;
}
load_plugin
(
host
);
}
void
update_plugin_window
(
PluginHost
*
host
,
HWND
hwnd
,
const
RECT
*
rect
)
...
...
@@ -769,7 +847,7 @@ void detach_plugin_hosts(HTMLDocumentNode *doc)
}
}
HRESULT
create_plugin_host
(
HTMLDocumentNode
*
doc
,
nsIDOMElement
*
nselem
,
IUnknown
*
unk
,
PluginHost
**
ret
)
HRESULT
create_plugin_host
(
HTMLDocumentNode
*
doc
,
nsIDOMElement
*
nselem
,
IUnknown
*
unk
,
const
CLSID
*
clsid
,
PluginHost
**
ret
)
{
PluginHost
*
host
;
HRESULT
hres
;
...
...
@@ -797,6 +875,7 @@ HRESULT create_plugin_host(HTMLDocumentNode *doc, nsIDOMElement *nselem, IUnknow
IUnknown_AddRef
(
unk
);
host
->
plugin_unk
=
unk
;
host
->
clsid
=
*
clsid
;
host
->
doc
=
doc
;
list_add_tail
(
&
doc
->
plugin_hosts
,
&
host
->
entry
);
...
...
This diff is collapsed.
Click to expand it.
dlls/mshtml/pluginhost.h
+
3
−
1
View file @
dbbcbd59
...
...
@@ -31,7 +31,9 @@ typedef struct {
LONG
ref
;
IUnknown
*
plugin_unk
;
CLSID
clsid
;
HWND
hwnd
;
RECT
rect
;
HTMLDocumentNode
*
doc
;
struct
list
entry
;
...
...
@@ -47,6 +49,6 @@ struct HTMLPluginContainer {
extern
const
IID
IID_HTMLPluginContainer
;
HRESULT
create_plugin_host
(
HTMLDocumentNode
*
,
nsIDOMElement
*
,
IUnknown
*
,
PluginHost
**
);
HRESULT
create_plugin_host
(
HTMLDocumentNode
*
,
nsIDOMElement
*
,
IUnknown
*
,
const
CLSID
*
,
PluginHost
**
);
void
update_plugin_window
(
PluginHost
*
,
HWND
,
const
RECT
*
);
void
detach_plugin_hosts
(
HTMLDocumentNode
*
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment