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
99a0da24
Commit
99a0da24
authored
Dec 06, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use an iface instead of a vtbl pointer in HTMLLoadOptions.
parent
0850b4e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
loadopts.c
dlls/mshtml/loadopts.c
+17
-18
No files found.
dlls/mshtml/loadopts.c
View file @
99a0da24
...
@@ -44,37 +44,38 @@ typedef struct load_opt {
...
@@ -44,37 +44,38 @@ typedef struct load_opt {
}
load_opt
;
}
load_opt
;
typedef
struct
{
typedef
struct
{
const
IHtmlLoadOptionsVtbl
*
lpHtmlLoadOptionsVtbl
;
IHtmlLoadOptions
IHtmlLoadOptions_iface
;
LONG
ref
;
LONG
ref
;
load_opt
*
opts
;
load_opt
*
opts
;
}
HTMLLoadOptions
;
}
HTMLLoadOptions
;
#define LOADOPTS(x) ((IHtmlLoadOptions*) &(x)->lpHtmlLoadOptionsVtbl)
static
inline
HTMLLoadOptions
*
impl_from_IHtmlLoadOptions
(
IHtmlLoadOptions
*
iface
)
{
#define LOADOPTS_THIS(iface) DEFINE_THIS(HTMLLoadOptions, HtmlLoadOptions, iface)
return
CONTAINING_RECORD
(
iface
,
HTMLLoadOptions
,
IHtmlLoadOptions_iface
);
}
static
HRESULT
WINAPI
HtmlLoadOptions_QueryInterface
(
IHtmlLoadOptions
*
iface
,
static
HRESULT
WINAPI
HtmlLoadOptions_QueryInterface
(
IHtmlLoadOptions
*
iface
,
REFIID
riid
,
void
**
ppv
)
REFIID
riid
,
void
**
ppv
)
{
{
HTMLLoadOptions
*
This
=
LOADOPTS_THIS
(
iface
);
HTMLLoadOptions
*
This
=
impl_from_IHtmlLoadOptions
(
iface
);
*
ppv
=
NULL
;
*
ppv
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
LOADOPTS
(
This
)
;
*
ppv
=
&
This
->
IHtmlLoadOptions_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IOptionArray
,
riid
))
{
}
else
if
(
IsEqualGUID
(
&
IID_IOptionArray
,
riid
))
{
TRACE
(
"(%p)->(IID_IOptionArray %p)
\n
"
,
This
,
ppv
);
TRACE
(
"(%p)->(IID_IOptionArray %p)
\n
"
,
This
,
ppv
);
*
ppv
=
LOADOPTS
(
This
)
;
*
ppv
=
&
This
->
IHtmlLoadOptions_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHtmlLoadOptions
,
riid
))
{
}
else
if
(
IsEqualGUID
(
&
IID_IHtmlLoadOptions
,
riid
))
{
TRACE
(
"(%p)->(IID_IHtmlLoadOptions %p)
\n
"
,
This
,
ppv
);
TRACE
(
"(%p)->(IID_IHtmlLoadOptions %p)
\n
"
,
This
,
ppv
);
*
ppv
=
LOADOPTS
(
This
)
;
*
ppv
=
&
This
->
IHtmlLoadOptions_iface
;
}
}
if
(
*
ppv
)
{
if
(
*
ppv
)
{
IHtmlLoadOptions_AddRef
(
LOADOPTS
(
This
)
);
IHtmlLoadOptions_AddRef
(
&
This
->
IHtmlLoadOptions_iface
);
return
S_OK
;
return
S_OK
;
}
}
...
@@ -84,7 +85,7 @@ static HRESULT WINAPI HtmlLoadOptions_QueryInterface(IHtmlLoadOptions *iface,
...
@@ -84,7 +85,7 @@ static HRESULT WINAPI HtmlLoadOptions_QueryInterface(IHtmlLoadOptions *iface,
static
ULONG
WINAPI
HtmlLoadOptions_AddRef
(
IHtmlLoadOptions
*
iface
)
static
ULONG
WINAPI
HtmlLoadOptions_AddRef
(
IHtmlLoadOptions
*
iface
)
{
{
HTMLLoadOptions
*
This
=
LOADOPTS_THIS
(
iface
);
HTMLLoadOptions
*
This
=
impl_from_IHtmlLoadOptions
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
...
@@ -94,7 +95,7 @@ static ULONG WINAPI HtmlLoadOptions_AddRef(IHtmlLoadOptions *iface)
...
@@ -94,7 +95,7 @@ static ULONG WINAPI HtmlLoadOptions_AddRef(IHtmlLoadOptions *iface)
static
ULONG
WINAPI
HtmlLoadOptions_Release
(
IHtmlLoadOptions
*
iface
)
static
ULONG
WINAPI
HtmlLoadOptions_Release
(
IHtmlLoadOptions
*
iface
)
{
{
HTMLLoadOptions
*
This
=
LOADOPTS_THIS
(
iface
);
HTMLLoadOptions
*
This
=
impl_from_IHtmlLoadOptions
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
...
@@ -119,7 +120,7 @@ static ULONG WINAPI HtmlLoadOptions_Release(IHtmlLoadOptions *iface)
...
@@ -119,7 +120,7 @@ static ULONG WINAPI HtmlLoadOptions_Release(IHtmlLoadOptions *iface)
static
HRESULT
WINAPI
HtmlLoadOptions_QueryOption
(
IHtmlLoadOptions
*
iface
,
DWORD
dwOption
,
static
HRESULT
WINAPI
HtmlLoadOptions_QueryOption
(
IHtmlLoadOptions
*
iface
,
DWORD
dwOption
,
LPVOID
pBuffer
,
ULONG
*
pcbBuf
)
LPVOID
pBuffer
,
ULONG
*
pcbBuf
)
{
{
HTMLLoadOptions
*
This
=
LOADOPTS_THIS
(
iface
);
HTMLLoadOptions
*
This
=
impl_from_IHtmlLoadOptions
(
iface
);
load_opt
*
iter
;
load_opt
*
iter
;
TRACE
(
"(%p)->(%d %p %p)
\n
"
,
This
,
dwOption
,
pBuffer
,
pcbBuf
);
TRACE
(
"(%p)->(%d %p %p)
\n
"
,
This
,
dwOption
,
pBuffer
,
pcbBuf
);
...
@@ -148,7 +149,7 @@ static HRESULT WINAPI HtmlLoadOptions_QueryOption(IHtmlLoadOptions *iface, DWORD
...
@@ -148,7 +149,7 @@ static HRESULT WINAPI HtmlLoadOptions_QueryOption(IHtmlLoadOptions *iface, DWORD
static
HRESULT
WINAPI
HtmlLoadOptions_SetOption
(
IHtmlLoadOptions
*
iface
,
DWORD
dwOption
,
static
HRESULT
WINAPI
HtmlLoadOptions_SetOption
(
IHtmlLoadOptions
*
iface
,
DWORD
dwOption
,
LPVOID
pBuffer
,
ULONG
cbBuf
)
LPVOID
pBuffer
,
ULONG
cbBuf
)
{
{
HTMLLoadOptions
*
This
=
LOADOPTS_THIS
(
iface
);
HTMLLoadOptions
*
This
=
impl_from_IHtmlLoadOptions
(
iface
);
load_opt
*
iter
=
NULL
;
load_opt
*
iter
=
NULL
;
TRACE
(
"(%p)->(%d %p %d)
\n
"
,
This
,
dwOption
,
pBuffer
,
cbBuf
);
TRACE
(
"(%p)->(%d %p %d)
\n
"
,
This
,
dwOption
,
pBuffer
,
cbBuf
);
...
@@ -182,8 +183,6 @@ static HRESULT WINAPI HtmlLoadOptions_SetOption(IHtmlLoadOptions *iface, DWORD d
...
@@ -182,8 +183,6 @@ static HRESULT WINAPI HtmlLoadOptions_SetOption(IHtmlLoadOptions *iface, DWORD d
return
S_OK
;
return
S_OK
;
}
}
#undef LOADOPTS_THIS
static
const
IHtmlLoadOptionsVtbl
HtmlLoadOptionsVtbl
=
{
static
const
IHtmlLoadOptionsVtbl
HtmlLoadOptionsVtbl
=
{
HtmlLoadOptions_QueryInterface
,
HtmlLoadOptions_QueryInterface
,
HtmlLoadOptions_AddRef
,
HtmlLoadOptions_AddRef
,
...
@@ -201,12 +200,12 @@ HRESULT HTMLLoadOptions_Create(IUnknown *pUnkOuter, REFIID riid, void** ppv)
...
@@ -201,12 +200,12 @@ HRESULT HTMLLoadOptions_Create(IUnknown *pUnkOuter, REFIID riid, void** ppv)
ret
=
heap_alloc
(
sizeof
(
HTMLLoadOptions
));
ret
=
heap_alloc
(
sizeof
(
HTMLLoadOptions
));
ret
->
lpHtmlLoadOptions
Vtbl
=
&
HtmlLoadOptionsVtbl
;
ret
->
IHtmlLoadOptions_iface
.
lp
Vtbl
=
&
HtmlLoadOptionsVtbl
;
ret
->
ref
=
1
;
ret
->
ref
=
1
;
ret
->
opts
=
NULL
;
ret
->
opts
=
NULL
;
hres
=
IHtmlLoadOptions_QueryInterface
(
LOADOPTS
(
ret
)
,
riid
,
ppv
);
hres
=
IHtmlLoadOptions_QueryInterface
(
&
ret
->
IHtmlLoadOptions_iface
,
riid
,
ppv
);
IHtmlLoadOptions_Release
(
LOADOPTS
(
ret
)
);
IHtmlLoadOptions_Release
(
&
ret
->
IHtmlLoadOptions_iface
);
return
hres
;
return
hres
;
}
}
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