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
0abef309
Commit
0abef309
authored
Jan 09, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Use an iface instead of a vtbl pointer in MkProtocol.
parent
d4f8ce0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
22 deletions
+23
-22
mk.c
dlls/urlmon/mk.c
+23
-22
No files found.
dlls/urlmon/mk.c
View file @
0abef309
...
...
@@ -22,29 +22,32 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
urlmon
);
typedef
struct
{
const
IInternetProtocolVtbl
*
lpIInternetProtocolVtbl
;
IInternetProtocol
IInternetProtocol_iface
;
LONG
ref
;
IStream
*
stream
;
}
MkProtocol
;
#define PROTOCOL_THIS(iface) DEFINE_THIS(MkProtocol, IInternetProtocol, iface)
static
inline
MkProtocol
*
impl_from_IInternetProtocol
(
IInternetProtocol
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
MkProtocol
,
IInternetProtocol_iface
);
}
static
HRESULT
WINAPI
MkProtocol_QueryInterface
(
IInternetProtocol
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
MkProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
MkProtocol
*
This
=
impl_from_IInternetProtocol
(
iface
);
*
ppv
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
PROTOCOL
(
This
)
;
*
ppv
=
&
This
->
IInternetProtocol_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IInternetProtocolRoot
,
riid
))
{
TRACE
(
"(%p)->(IID_IInternetProtocolRoot %p)
\n
"
,
This
,
ppv
);
*
ppv
=
PROTOCOL
(
This
)
;
*
ppv
=
&
This
->
IInternetProtocol_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IInternetProtocol
,
riid
))
{
TRACE
(
"(%p)->(IID_IInternetProtocol %p)
\n
"
,
This
,
ppv
);
*
ppv
=
PROTOCOL
(
This
)
;
*
ppv
=
&
This
->
IInternetProtocol_iface
;
}
if
(
*
ppv
)
{
...
...
@@ -58,7 +61,7 @@ static HRESULT WINAPI MkProtocol_QueryInterface(IInternetProtocol *iface, REFIID
static
ULONG
WINAPI
MkProtocol_AddRef
(
IInternetProtocol
*
iface
)
{
MkProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
MkProtocol
*
This
=
impl_from_IInternetProtocol
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
...
...
@@ -66,7 +69,7 @@ static ULONG WINAPI MkProtocol_AddRef(IInternetProtocol *iface)
static
ULONG
WINAPI
MkProtocol_Release
(
IInternetProtocol
*
iface
)
{
MkProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
MkProtocol
*
This
=
impl_from_IInternetProtocol
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
...
...
@@ -93,7 +96,7 @@ static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
IInternetProtocolSink
*
pOIProtSink
,
IInternetBindInfo
*
pOIBindInfo
,
DWORD
grfPI
,
HANDLE_PTR
dwReserved
)
{
MkProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
MkProtocol
*
This
=
impl_from_IInternetProtocol
(
iface
);
IParseDisplayName
*
pdn
;
IMoniker
*
mon
;
LPWSTR
mime
,
progid
,
display_name
;
...
...
@@ -188,7 +191,7 @@ static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
static
HRESULT
WINAPI
MkProtocol_Continue
(
IInternetProtocol
*
iface
,
PROTOCOLDATA
*
pProtocolData
)
{
MkProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
MkProtocol
*
This
=
impl_from_IInternetProtocol
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pProtocolData
);
return
E_NOTIMPL
;
}
...
...
@@ -196,14 +199,14 @@ static HRESULT WINAPI MkProtocol_Continue(IInternetProtocol *iface, PROTOCOLDATA
static
HRESULT
WINAPI
MkProtocol_Abort
(
IInternetProtocol
*
iface
,
HRESULT
hrReason
,
DWORD
dwOptions
)
{
MkProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
MkProtocol
*
This
=
impl_from_IInternetProtocol
(
iface
);
FIXME
(
"(%p)->(%08x %08x)
\n
"
,
This
,
hrReason
,
dwOptions
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MkProtocol_Terminate
(
IInternetProtocol
*
iface
,
DWORD
dwOptions
)
{
MkProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
MkProtocol
*
This
=
impl_from_IInternetProtocol
(
iface
);
TRACE
(
"(%p)->(%08x)
\n
"
,
This
,
dwOptions
);
...
...
@@ -212,14 +215,14 @@ static HRESULT WINAPI MkProtocol_Terminate(IInternetProtocol *iface, DWORD dwOpt
static
HRESULT
WINAPI
MkProtocol_Suspend
(
IInternetProtocol
*
iface
)
{
MkProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
MkProtocol
*
This
=
impl_from_IInternetProtocol
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MkProtocol_Resume
(
IInternetProtocol
*
iface
)
{
MkProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
MkProtocol
*
This
=
impl_from_IInternetProtocol
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
...
...
@@ -227,7 +230,7 @@ static HRESULT WINAPI MkProtocol_Resume(IInternetProtocol *iface)
static
HRESULT
WINAPI
MkProtocol_Read
(
IInternetProtocol
*
iface
,
void
*
pv
,
ULONG
cb
,
ULONG
*
pcbRead
)
{
MkProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
MkProtocol
*
This
=
impl_from_IInternetProtocol
(
iface
);
TRACE
(
"(%p)->(%p %u %p)
\n
"
,
This
,
pv
,
cb
,
pcbRead
);
...
...
@@ -240,14 +243,14 @@ static HRESULT WINAPI MkProtocol_Read(IInternetProtocol *iface, void *pv,
static
HRESULT
WINAPI
MkProtocol_Seek
(
IInternetProtocol
*
iface
,
LARGE_INTEGER
dlibMove
,
DWORD
dwOrigin
,
ULARGE_INTEGER
*
plibNewPosition
)
{
MkProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
MkProtocol
*
This
=
impl_from_IInternetProtocol
(
iface
);
FIXME
(
"(%p)->(%d %d %p)
\n
"
,
This
,
dlibMove
.
u
.
LowPart
,
dwOrigin
,
plibNewPosition
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MkProtocol_LockRequest
(
IInternetProtocol
*
iface
,
DWORD
dwOptions
)
{
MkProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
MkProtocol
*
This
=
impl_from_IInternetProtocol
(
iface
);
TRACE
(
"(%p)->(%08x)
\n
"
,
This
,
dwOptions
);
...
...
@@ -256,15 +259,13 @@ static HRESULT WINAPI MkProtocol_LockRequest(IInternetProtocol *iface, DWORD dwO
static
HRESULT
WINAPI
MkProtocol_UnlockRequest
(
IInternetProtocol
*
iface
)
{
MkProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
MkProtocol
*
This
=
impl_from_IInternetProtocol
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
S_OK
;
}
#undef PROTOCOL_THIS
static
const
IInternetProtocolVtbl
MkProtocolVtbl
=
{
MkProtocol_QueryInterface
,
MkProtocol_AddRef
,
...
...
@@ -291,14 +292,14 @@ HRESULT MkProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
ret
=
heap_alloc
(
sizeof
(
MkProtocol
));
ret
->
lpIInternetProtocol
Vtbl
=
&
MkProtocolVtbl
;
ret
->
IInternetProtocol_iface
.
lp
Vtbl
=
&
MkProtocolVtbl
;
ret
->
ref
=
1
;
ret
->
stream
=
NULL
;
/* NOTE:
* Native returns NULL ppobj and S_OK in CreateInstance if called with IID_IUnknown riid.
*/
*
ppobj
=
PROTOCOL
(
ret
)
;
*
ppobj
=
&
ret
->
IInternetProtocol_iface
;
return
S_OK
;
}
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