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
f4a797e9
Commit
f4a797e9
authored
Apr 29, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Apr 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implement IObjectSafety for IXMLDOMDocument2.
parent
af80b06f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
domdoc.c
dlls/msxml3/domdoc.c
+72
-0
No files found.
dlls/msxml3/domdoc.c
View file @
f4a797e9
...
...
@@ -35,6 +35,7 @@
#include "winreg.h"
#include "shlwapi.h"
#include "ocidl.h"
#include "objsafe.h"
#include "wine/debug.h"
...
...
@@ -171,6 +172,7 @@ typedef struct _domdoc
const
struct
IXMLDOMDocument2Vtbl
*
lpVtbl
;
const
struct
IPersistStreamVtbl
*
lpvtblIPersistStream
;
const
struct
IObjectWithSiteVtbl
*
lpvtblIObjectWithSite
;
const
struct
IObjectSafetyVtbl
*
lpvtblIObjectSafety
;
LONG
ref
;
VARIANT_BOOL
async
;
VARIANT_BOOL
validating
;
...
...
@@ -187,6 +189,10 @@ typedef struct _domdoc
/* IObjectWithSite*/
IUnknown
*
site
;
/* IObjectSafety */
DWORD
safeopt
;
}
domdoc
;
LONG
xmldoc_add_ref
(
xmlDocPtr
doc
)
...
...
@@ -229,6 +235,12 @@ static inline domdoc *impl_from_IObjectWithSite(IObjectWithSite *iface)
return
(
domdoc
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
domdoc
,
lpvtblIObjectWithSite
));
}
static
inline
domdoc
*
impl_from_IObjectSafety
(
IObjectSafety
*
iface
)
{
return
(
domdoc
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
domdoc
,
lpvtblIObjectSafety
));
}
/************************************************************************
* xmldoc implementation of IPersistStream.
*/
...
...
@@ -2019,6 +2031,64 @@ static const IObjectWithSiteVtbl domdocObjectSite =
xmldoc_GetSite
,
};
static
HRESULT
WINAPI
xmldoc_Safety_QueryInterface
(
IObjectSafety
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
domdoc
*
This
=
impl_from_IObjectSafety
(
iface
);
return
IXMLDocument_QueryInterface
(
(
IXMLDocument
*
)
This
,
riid
,
ppv
);
}
static
ULONG
WINAPI
xmldoc_Safety_AddRef
(
IObjectSafety
*
iface
)
{
domdoc
*
This
=
impl_from_IObjectSafety
(
iface
);
return
IXMLDocument_AddRef
((
IXMLDocument
*
)
This
);
}
static
ULONG
WINAPI
xmldoc_Safety_Release
(
IObjectSafety
*
iface
)
{
domdoc
*
This
=
impl_from_IObjectSafety
(
iface
);
return
IXMLDocument_Release
((
IXMLDocument
*
)
This
);
}
#define SUPPORTED_OPTIONS (INTERFACESAFE_FOR_UNTRUSTED_CALLER|INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_SECURITY_MANAGER)
static
HRESULT
WINAPI
xmldoc_Safety_GetInterfaceSafetyOptions
(
IObjectSafety
*
iface
,
REFIID
riid
,
DWORD
*
pdwSupportedOptions
,
DWORD
*
pdwEnabledOptions
)
{
domdoc
*
This
=
impl_from_IObjectSafety
(
iface
);
TRACE
(
"(%p)->(%s %p %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
pdwSupportedOptions
,
pdwEnabledOptions
);
if
(
!
pdwSupportedOptions
||
!
pdwEnabledOptions
)
return
E_POINTER
;
*
pdwSupportedOptions
=
SUPPORTED_OPTIONS
;
*
pdwEnabledOptions
=
This
->
safeopt
;
return
S_OK
;
}
static
HRESULT
WINAPI
xmldoc_Safety_SetInterfaceSafetyOptions
(
IObjectSafety
*
iface
,
REFIID
riid
,
DWORD
dwOptionSetMask
,
DWORD
dwEnabledOptions
)
{
domdoc
*
This
=
impl_from_IObjectSafety
(
iface
);
TRACE
(
"(%p)->(%s %x %x)
\n
"
,
This
,
debugstr_guid
(
riid
),
dwOptionSetMask
,
dwEnabledOptions
);
if
(
dwOptionSetMask
&
~
SUPPORTED_OPTIONS
)
return
E_FAIL
;
This
->
safeopt
=
dwEnabledOptions
&
dwEnabledOptions
;
return
S_OK
;
}
static
const
IObjectSafetyVtbl
domdocObjectSafetyVtbl
=
{
xmldoc_Safety_QueryInterface
,
xmldoc_Safety_AddRef
,
xmldoc_Safety_Release
,
xmldoc_Safety_GetInterfaceSafetyOptions
,
xmldoc_Safety_SetInterfaceSafetyOptions
};
HRESULT
DOMDocument_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
{
domdoc
*
doc
;
...
...
@@ -2034,6 +2104,7 @@ HRESULT DOMDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj)
doc
->
lpVtbl
=
&
domdoc_vtbl
;
doc
->
lpvtblIPersistStream
=
&
xmldoc_IPersistStream_VTable
;
doc
->
lpvtblIObjectWithSite
=
&
domdocObjectSite
;
doc
->
lpvtblIObjectSafety
=
&
domdocObjectSafetyVtbl
;
doc
->
ref
=
1
;
doc
->
async
=
0
;
doc
->
validating
=
0
;
...
...
@@ -2044,6 +2115,7 @@ HRESULT DOMDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj)
doc
->
schema
=
NULL
;
doc
->
stream
=
NULL
;
doc
->
site
=
NULL
;
doc
->
safeopt
=
0
;
xmldoc
=
xmlNewDoc
(
NULL
);
if
(
!
xmldoc
)
...
...
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