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
Zsolt Vadász
wine
Commits
8c0a6943
Commit
8c0a6943
authored
14 years ago
by
Michael Stefaniuc
Committed by
Alexandre Julliard
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
urlmon: COM cleanup for the IMoniker iface.
parent
0ceabe88
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/urlmon/umon.c
+35
-32
35 additions, 32 deletions
dlls/urlmon/umon.c
with
35 additions
and
32 deletions
dlls/urlmon/umon.c
+
35
−
32
View file @
8c0a6943
...
...
@@ -32,7 +32,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
urlmon
);
typedef
struct
{
const
IMoniker
Vtbl
*
lp
IMoniker
Vtbl
;
IMoniker
IMoniker
_iface
;
IUriContainer
IUriContainer_iface
;
LONG
ref
;
...
...
@@ -40,11 +40,14 @@ typedef struct {
LPOLESTR
URLName
;
/* URL string identified by this URLmoniker */
}
URLMoniker
;
#define MONIKER_THIS(iface) DEFINE_THIS(URLMoniker, IMoniker, iface)
static
inline
URLMoniker
*
impl_from_IMoniker
(
IMoniker
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
URLMoniker
,
IMoniker_iface
);
}
static
HRESULT
WINAPI
URLMoniker_QueryInterface
(
IMoniker
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
if
(
!
ppv
)
return
E_INVALIDARG
;
...
...
@@ -79,7 +82,7 @@ static HRESULT WINAPI URLMoniker_QueryInterface(IMoniker *iface, REFIID riid, vo
static
ULONG
WINAPI
URLMoniker_AddRef
(
IMoniker
*
iface
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%u
\n
"
,
This
,
refCount
);
...
...
@@ -89,7 +92,7 @@ static ULONG WINAPI URLMoniker_AddRef(IMoniker *iface)
static
ULONG
WINAPI
URLMoniker_Release
(
IMoniker
*
iface
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%u
\n
"
,
This
,
refCount
);
...
...
@@ -106,7 +109,7 @@ static ULONG WINAPI URLMoniker_Release(IMoniker *iface)
static
HRESULT
WINAPI
URLMoniker_GetClassID
(
IMoniker
*
iface
,
CLSID
*
pClassID
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
TRACE
(
"(%p,%p)
\n
"
,
This
,
pClassID
);
...
...
@@ -120,7 +123,7 @@ static HRESULT WINAPI URLMoniker_GetClassID(IMoniker *iface, CLSID *pClassID)
static
HRESULT
WINAPI
URLMoniker_IsDirty
(
IMoniker
*
iface
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
...
...
@@ -132,7 +135,7 @@ static HRESULT WINAPI URLMoniker_IsDirty(IMoniker *iface)
static
HRESULT
WINAPI
URLMoniker_Load
(
IMoniker
*
iface
,
IStream
*
pStm
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
HRESULT
res
;
ULONG
size
;
ULONG
got
;
...
...
@@ -168,7 +171,7 @@ static HRESULT WINAPI URLMoniker_Load(IMoniker* iface,IStream* pStm)
static
HRESULT
WINAPI
URLMoniker_Save
(
IMoniker
*
iface
,
IStream
*
pStm
,
BOOL
fClearDirty
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
HRESULT
res
;
ULONG
size
;
...
...
@@ -188,7 +191,7 @@ static HRESULT WINAPI URLMoniker_Save(IMoniker *iface, IStream* pStm, BOOL fClea
static
HRESULT
WINAPI
URLMoniker_GetSizeMax
(
IMoniker
*
iface
,
ULARGE_INTEGER
*
pcbSize
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
TRACE
(
"(%p,%p)
\n
"
,
This
,
pcbSize
);
...
...
@@ -202,7 +205,7 @@ static HRESULT WINAPI URLMoniker_GetSizeMax(IMoniker* iface, ULARGE_INTEGER *pcb
static
HRESULT
WINAPI
URLMoniker_BindToObject
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
IMoniker
*
pmkToLeft
,
REFIID
riid
,
void
**
ppv
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
IRunningObjectTable
*
obj_tbl
;
IUri
*
uri
;
HRESULT
hres
;
...
...
@@ -228,7 +231,7 @@ static HRESULT WINAPI URLMoniker_BindToObject(IMoniker *iface, IBindCtx* pbc, IM
static
HRESULT
WINAPI
URLMoniker_BindToStorage
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
IMoniker
*
pmkToLeft
,
REFIID
riid
,
void
**
ppvObject
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
IUri
*
uri
;
HRESULT
hres
;
...
...
@@ -250,8 +253,8 @@ static HRESULT WINAPI URLMoniker_BindToStorage(IMoniker* iface, IBindCtx* pbc,
static
HRESULT
WINAPI
URLMoniker_Reduce
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
DWORD
dwReduceHowFar
,
IMoniker
**
ppmkToLeft
,
IMoniker
**
ppmkReduced
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
TRACE
(
"(%p,%p,%d,%p,%p)
\n
"
,
This
,
pbc
,
dwReduceHowFar
,
ppmkToLeft
,
ppmkReduced
);
if
(
!
ppmkReduced
)
...
...
@@ -265,14 +268,14 @@ static HRESULT WINAPI URLMoniker_Reduce(IMoniker *iface, IBindCtx *pbc,
static
HRESULT
WINAPI
URLMoniker_ComposeWith
(
IMoniker
*
iface
,
IMoniker
*
pmkRight
,
BOOL
fOnlyIfNotGeneric
,
IMoniker
**
ppmkComposite
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
FIXME
(
"(%p)->(%p,%d,%p): stub
\n
"
,
This
,
pmkRight
,
fOnlyIfNotGeneric
,
ppmkComposite
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
URLMoniker_Enum
(
IMoniker
*
iface
,
BOOL
fForward
,
IEnumMoniker
**
ppenumMoniker
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
TRACE
(
"(%p,%d,%p)
\n
"
,
This
,
fForward
,
ppenumMoniker
);
...
...
@@ -286,7 +289,7 @@ static HRESULT WINAPI URLMoniker_Enum(IMoniker *iface, BOOL fForward, IEnumMonik
static
HRESULT
WINAPI
URLMoniker_IsEqual
(
IMoniker
*
iface
,
IMoniker
*
pmkOtherMoniker
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
CLSID
clsid
;
LPOLESTR
urlPath
;
IBindCtx
*
bind
;
...
...
@@ -320,7 +323,7 @@ static HRESULT WINAPI URLMoniker_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoni
static
HRESULT
WINAPI
URLMoniker_Hash
(
IMoniker
*
iface
,
DWORD
*
pdwHash
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
int
h
=
0
,
i
,
skip
,
len
;
int
off
=
0
;
LPOLESTR
val
;
...
...
@@ -351,7 +354,7 @@ static HRESULT WINAPI URLMoniker_Hash(IMoniker *iface, DWORD *pdwHash)
static
HRESULT
WINAPI
URLMoniker_IsRunning
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
IMoniker
*
pmkToLeft
,
IMoniker
*
pmkNewlyRunning
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
FIXME
(
"(%p)->(%p,%p,%p): stub
\n
"
,
This
,
pbc
,
pmkToLeft
,
pmkNewlyRunning
);
return
E_NOTIMPL
;
}
...
...
@@ -359,28 +362,28 @@ static HRESULT WINAPI URLMoniker_IsRunning(IMoniker* iface, IBindCtx* pbc,
static
HRESULT
WINAPI
URLMoniker_GetTimeOfLastChange
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
IMoniker
*
pmkToLeft
,
FILETIME
*
pFileTime
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
FIXME
(
"(%p)->(%p,%p,%p): stub
\n
"
,
This
,
pbc
,
pmkToLeft
,
pFileTime
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
URLMoniker_Inverse
(
IMoniker
*
iface
,
IMoniker
**
ppmk
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
TRACE
(
"(%p,%p)
\n
"
,
This
,
ppmk
);
return
MK_E_NOINVERSE
;
}
static
HRESULT
WINAPI
URLMoniker_CommonPrefixWith
(
IMoniker
*
iface
,
IMoniker
*
pmkOther
,
IMoniker
**
ppmkPrefix
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
FIXME
(
"(%p)->(%p,%p): stub
\n
"
,
This
,
pmkOther
,
ppmkPrefix
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
URLMoniker_RelativePathTo
(
IMoniker
*
iface
,
IMoniker
*
pmOther
,
IMoniker
**
ppmkRelPath
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
FIXME
(
"(%p)->(%p,%p): stub
\n
"
,
This
,
pmOther
,
ppmkRelPath
);
return
E_NOTIMPL
;
}
...
...
@@ -388,7 +391,7 @@ static HRESULT WINAPI URLMoniker_RelativePathTo(IMoniker *iface, IMoniker *pmOth
static
HRESULT
WINAPI
URLMoniker_GetDisplayName
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
IMoniker
*
pmkToLeft
,
LPOLESTR
*
ppszDisplayName
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
int
len
;
TRACE
(
"(%p,%p,%p,%p)
\n
"
,
This
,
pbc
,
pmkToLeft
,
ppszDisplayName
);
...
...
@@ -413,14 +416,14 @@ static HRESULT WINAPI URLMoniker_GetDisplayName(IMoniker *iface, IBindCtx *pbc,
static
HRESULT
WINAPI
URLMoniker_ParseDisplayName
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
IMoniker
*
pmkToLeft
,
LPOLESTR
pszDisplayName
,
ULONG
*
pchEaten
,
IMoniker
**
ppmkOut
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
FIXME
(
"(%p)->(%p,%p,%p,%p,%p): stub
\n
"
,
This
,
pbc
,
pmkToLeft
,
pszDisplayName
,
pchEaten
,
ppmkOut
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
URLMoniker_IsSystemMoniker
(
IMoniker
*
iface
,
DWORD
*
pwdMksys
)
{
URLMoniker
*
This
=
MONIKER_THIS
(
iface
);
URLMoniker
*
This
=
impl_from_IMoniker
(
iface
);
TRACE
(
"(%p,%p)
\n
"
,
This
,
pwdMksys
);
...
...
@@ -466,19 +469,19 @@ static inline URLMoniker *impl_from_IUriContainer(IUriContainer *iface)
static
HRESULT
WINAPI
UriContainer_QueryInterface
(
IUriContainer
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
URLMoniker
*
This
=
impl_from_IUriContainer
(
iface
);
return
IMoniker_QueryInterface
(
(
IMoniker
*
)
&
This
->
lp
IMoniker
Vtbl
,
riid
,
ppv
);
return
IMoniker_QueryInterface
(
&
This
->
IMoniker
_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
UriContainer_AddRef
(
IUriContainer
*
iface
)
{
URLMoniker
*
This
=
impl_from_IUriContainer
(
iface
);
return
IMoniker_AddRef
(
(
IMoniker
*
)
&
This
->
lp
IMoniker
Vtbl
);
return
IMoniker_AddRef
(
&
This
->
IMoniker
_iface
);
}
static
ULONG
WINAPI
UriContainer_Release
(
IUriContainer
*
iface
)
{
URLMoniker
*
This
=
impl_from_IUriContainer
(
iface
);
return
IMoniker_Release
(
(
IMoniker
*
)
&
This
->
lp
IMoniker
Vtbl
);
return
IMoniker_Release
(
&
This
->
IMoniker
_iface
);
}
static
HRESULT
WINAPI
UriContainer_GetIUri
(
IUriContainer
*
iface
,
IUri
**
ppIUri
)
...
...
@@ -506,7 +509,7 @@ static URLMoniker *alloc_moniker(void)
if
(
!
ret
)
return
NULL
;
ret
->
lp
IMonikerVtbl
=
&
URLMonikerVtbl
;
ret
->
IMoniker
_iface
.
lp
Vtbl
=
&
URLMonikerVtbl
;
ret
->
IUriContainer_iface
.
lpVtbl
=
&
UriContainerVtbl
;
ret
->
ref
=
1
;
ret
->
URLName
=
NULL
;
...
...
@@ -602,8 +605,8 @@ HRESULT WINAPI CreateURLMonikerEx(IMoniker *pmkContext, LPCWSTR szURL, IMoniker
hres
=
URLMoniker_Init
(
obj
,
lefturl
,
szURL
);
CoTaskMemFree
(
lefturl
);
if
(
SUCCEEDED
(
hres
))
hres
=
URLMoniker_QueryInterface
(
(
IMoniker
*
)
obj
,
&
IID_IMoniker
,
(
void
**
)
ppmk
);
IMoniker_Release
(
(
IMoniker
*
)
obj
);
hres
=
URLMoniker_QueryInterface
(
&
obj
->
IMoniker
_iface
,
&
IID_IMoniker
,
(
void
**
)
ppmk
);
IMoniker_Release
(
&
obj
->
IMoniker
_iface
);
return
hres
;
}
...
...
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