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
0449701c
Commit
0449701c
authored
Feb 11, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Feb 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Remove superfluous pointer casts.
parent
bcd00b43
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
90 additions
and
101 deletions
+90
-101
antimoniker.c
dlls/ole32/antimoniker.c
+1
-1
bindctx.c
dlls/ole32/bindctx.c
+1
-1
classmoniker.c
dlls/ole32/classmoniker.c
+1
-1
clipboard.c
dlls/ole32/clipboard.c
+3
-3
comcat.c
dlls/ole32/comcat.c
+7
-7
compositemoniker.c
dlls/ole32/compositemoniker.c
+2
-2
datacache.c
dlls/ole32/datacache.c
+5
-5
defaulthandler.c
dlls/ole32/defaulthandler.c
+3
-3
errorinfo.c
dlls/ole32/errorinfo.c
+4
-4
filemoniker.c
dlls/ole32/filemoniker.c
+2
-2
ftmarshal.c
dlls/ole32/ftmarshal.c
+2
-2
git.c
dlls/ole32/git.c
+1
-1
hglobalstream.c
dlls/ole32/hglobalstream.c
+1
-1
ifs.c
dlls/ole32/ifs.c
+2
-2
itemmoniker.c
dlls/ole32/itemmoniker.c
+1
-1
marshal.c
dlls/ole32/marshal.c
+7
-7
memlockbytes.c
dlls/ole32/memlockbytes.c
+1
-1
moniker.c
dlls/ole32/moniker.c
+3
-3
ole2.c
dlls/ole32/ole2.c
+5
-10
oleobj.c
dlls/ole32/oleobj.c
+1
-1
rpc.c
dlls/ole32/rpc.c
+11
-11
stg_prop.c
dlls/ole32/stg_prop.c
+10
-10
stg_stream.c
dlls/ole32/stg_stream.c
+1
-1
storage.c
dlls/ole32/storage.c
+1
-1
storage32.c
dlls/ole32/storage32.c
+13
-19
stubmanager.c
dlls/ole32/stubmanager.c
+1
-1
No files found.
dlls/ole32/antimoniker.c
View file @
0449701c
...
...
@@ -80,7 +80,7 @@ AntiMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject)
IsEqualIID
(
&
IID_IMoniker
,
riid
))
*
ppvObject
=
iface
;
else
if
(
IsEqualIID
(
&
IID_IROTData
,
riid
))
*
ppvObject
=
(
IROTData
*
)
&
(
This
->
lpvtbl2
)
;
*
ppvObject
=
&
This
->
lpvtbl2
;
else
if
(
IsEqualIID
(
&
IID_IMarshal
,
riid
))
{
HRESULT
hr
=
S_OK
;
...
...
dlls/ole32/bindctx.c
View file @
0449701c
...
...
@@ -87,7 +87,7 @@ BindCtxImpl_QueryInterface(IBindCtx* iface,REFIID riid,void** ppvObject)
if
(
IsEqualIID
(
&
IID_IUnknown
,
riid
)
||
IsEqualIID
(
&
IID_IBindCtx
,
riid
))
{
*
ppvObject
=
(
IBindCtx
*
)
This
;
*
ppvObject
=
This
;
IBindCtx_AddRef
(
iface
);
return
S_OK
;
}
...
...
dlls/ole32/classmoniker.c
View file @
0449701c
...
...
@@ -80,7 +80,7 @@ static HRESULT WINAPI ClassMoniker_QueryInterface(IMoniker* iface,REFIID riid,vo
*
ppvObject
=
iface
;
}
else
if
(
IsEqualIID
(
&
IID_IROTData
,
riid
))
*
ppvObject
=
(
IROTData
*
)
&
(
This
->
lpVtblRotData
)
;
*
ppvObject
=
&
This
->
lpVtblRotData
;
else
if
(
IsEqualIID
(
&
IID_IMarshal
,
riid
))
{
HRESULT
hr
=
S_OK
;
...
...
dlls/ole32/clipboard.c
View file @
0449701c
...
...
@@ -1138,7 +1138,7 @@ static HRESULT WINAPI OLEClipbrd_IDataObject_QueryInterface(
}
else
if
(
memcmp
(
&
IID_IDataObject
,
riid
,
sizeof
(
IID_IDataObject
))
==
0
)
{
*
ppvObject
=
(
IDataObject
*
)
&
(
This
->
lpvtbl1
)
;
*
ppvObject
=
&
This
->
lpvtbl1
;
}
else
/* We only support IUnknown and IDataObject */
{
...
...
@@ -1569,7 +1569,7 @@ static LPENUMFORMATETC OLEClipbrd_IEnumFORMATETC_Construct(UINT cfmt, const FORM
HeapFree
(
GetProcessHeap
(),
0
,
ef
);
return
NULL
;
}
ef
->
pFmt
=
(
LPFORMATETC
)
IMalloc_Alloc
(
pIMalloc
,
size
);
ef
->
pFmt
=
IMalloc_Alloc
(
pIMalloc
,
size
);
IMalloc_Release
(
pIMalloc
);
if
(
ef
->
pFmt
)
...
...
@@ -1605,7 +1605,7 @@ static HRESULT WINAPI OLEClipbrd_IEnumFORMATETC_QueryInterface
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IEnumFORMATETC
))
{
*
ppvObj
=
(
IDataObject
*
)
This
;
*
ppvObj
=
This
;
}
if
(
*
ppvObj
)
...
...
dlls/ole32/comcat.c
View file @
0449701c
...
...
@@ -726,7 +726,7 @@ static HRESULT WINAPI COMCAT_IClassFactory_QueryInterface(
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IClassFactory
))
{
*
ppvObj
=
(
LPVOID
)
iface
;
*
ppvObj
=
iface
;
IUnknown_AddRef
(
iface
);
return
S_OK
;
}
...
...
@@ -841,7 +841,7 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_QueryInterface(
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IEnumCATEGORYINFO
))
{
*
ppvObj
=
(
LPVOID
)
iface
;
*
ppvObj
=
iface
;
COMCAT_IEnumCATEGORYINFO_AddRef
(
iface
);
return
S_OK
;
}
...
...
@@ -1024,7 +1024,7 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_QueryInterface(
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IEnumGUID
))
{
*
ppvObj
=
(
LPVOID
)
iface
;
*
ppvObj
=
iface
;
COMCAT_CLSID_IEnumGUID_AddRef
(
iface
);
return
S_OK
;
}
...
...
@@ -1042,7 +1042,7 @@ static ULONG WINAPI COMCAT_CLSID_IEnumGUID_Release(LPENUMGUID iface)
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
{
if
(
This
->
key
)
RegCloseKey
(
This
->
key
);
HeapFree
(
GetProcessHeap
(),
0
,
(
LPVOID
)
This
->
categories
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
categories
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
}
...
...
@@ -1133,14 +1133,14 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Clone(
new_this
->
lpVtbl
=
This
->
lpVtbl
;
new_this
->
ref
=
1
;
size
=
HeapSize
(
GetProcessHeap
(),
0
,
(
LPVOID
)
This
->
categories
);
size
=
HeapSize
(
GetProcessHeap
(),
0
,
This
->
categories
);
new_this
->
categories
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
new_this
->
categories
==
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
new_this
);
return
E_OUTOFMEMORY
;
}
memcpy
(
(
LPVOID
)
new_this
->
categories
,
This
->
categories
,
size
);
memcpy
(
new_this
->
categories
,
This
->
categories
,
size
);
/* FIXME: could we more efficiently use DuplicateHandle? */
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
keyname
,
0
,
KEY_READ
,
&
new_this
->
key
);
new_this
->
next_index
=
This
->
next_index
;
...
...
@@ -1210,7 +1210,7 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_QueryInterface(
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IEnumGUID
))
{
*
ppvObj
=
(
LPVOID
)
iface
;
*
ppvObj
=
iface
;
COMCAT_CATID_IEnumGUID_AddRef
(
iface
);
return
S_OK
;
}
...
...
dlls/ole32/compositemoniker.c
View file @
0449701c
...
...
@@ -115,9 +115,9 @@ CompositeMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject
)
*
ppvObject
=
iface
;
else
if
(
IsEqualIID
(
&
IID_IROTData
,
riid
))
*
ppvObject
=
(
IROTData
*
)
&
(
This
->
lpvtbl2
)
;
*
ppvObject
=
&
This
->
lpvtbl2
;
else
if
(
IsEqualIID
(
&
IID_IMarshal
,
riid
))
*
ppvObject
=
(
IROTData
*
)
&
(
This
->
lpvtblMarshal
)
;
*
ppvObject
=
&
This
->
lpvtblMarshal
;
/* Check that we obtained an interface.*/
if
((
*
ppvObject
)
==
0
)
...
...
dlls/ole32/datacache.c
View file @
0449701c
...
...
@@ -892,26 +892,26 @@ static HRESULT WINAPI DataCache_NDIUnknown_QueryInterface(
}
else
if
(
memcmp
(
&
IID_IDataObject
,
riid
,
sizeof
(
IID_IDataObject
))
==
0
)
{
*
ppvObject
=
(
IDataObject
*
)
&
(
this
->
lpVtbl
)
;
*
ppvObject
=
&
this
->
lpVtbl
;
}
else
if
(
(
memcmp
(
&
IID_IPersistStorage
,
riid
,
sizeof
(
IID_IPersistStorage
))
==
0
)
||
(
memcmp
(
&
IID_IPersist
,
riid
,
sizeof
(
IID_IPersist
))
==
0
)
)
{
*
ppvObject
=
(
IPersistStorage
*
)
&
(
this
->
lpvtblIPersistStorage
)
;
*
ppvObject
=
&
this
->
lpvtblIPersistStorage
;
}
else
if
(
(
memcmp
(
&
IID_IViewObject
,
riid
,
sizeof
(
IID_IViewObject
))
==
0
)
||
(
memcmp
(
&
IID_IViewObject2
,
riid
,
sizeof
(
IID_IViewObject2
))
==
0
)
)
{
*
ppvObject
=
(
IViewObject2
*
)
&
(
this
->
lpvtblIViewObject
)
;
*
ppvObject
=
&
this
->
lpvtblIViewObject
;
}
else
if
(
(
memcmp
(
&
IID_IOleCache
,
riid
,
sizeof
(
IID_IOleCache
))
==
0
)
||
(
memcmp
(
&
IID_IOleCache2
,
riid
,
sizeof
(
IID_IOleCache2
))
==
0
)
)
{
*
ppvObject
=
(
IOleCache2
*
)
&
(
this
->
lpvtblIOleCache2
)
;
*
ppvObject
=
&
this
->
lpvtblIOleCache2
;
}
else
if
(
memcmp
(
&
IID_IOleCacheControl
,
riid
,
sizeof
(
IID_IOleCacheControl
))
==
0
)
{
*
ppvObject
=
(
IOleCacheControl
*
)
&
(
this
->
lpvtblIOleCacheControl
)
;
*
ppvObject
=
&
this
->
lpvtblIOleCacheControl
;
}
/*
...
...
dlls/ole32/defaulthandler.c
View file @
0449701c
...
...
@@ -206,11 +206,11 @@ static HRESULT WINAPI DefaultHandler_NDIUnknown_QueryInterface(
if
(
IsEqualIID
(
&
IID_IUnknown
,
riid
))
*
ppvObject
=
iface
;
else
if
(
IsEqualIID
(
&
IID_IOleObject
,
riid
))
*
ppvObject
=
(
IOleObject
*
)
&
This
->
lpVtbl
;
*
ppvObject
=
&
This
->
lpVtbl
;
else
if
(
IsEqualIID
(
&
IID_IDataObject
,
riid
))
*
ppvObject
=
(
IDataObject
*
)
&
This
->
lpvtblIDataObject
;
*
ppvObject
=
&
This
->
lpvtblIDataObject
;
else
if
(
IsEqualIID
(
&
IID_IRunnableObject
,
riid
))
*
ppvObject
=
(
IRunnableObject
*
)
&
This
->
lpvtblIRunnableObject
;
*
ppvObject
=
&
This
->
lpvtblIRunnableObject
;
else
if
(
IsEqualIID
(
&
IID_IPersist
,
riid
)
||
IsEqualIID
(
&
IID_IPersistStorage
,
riid
))
*
ppvObject
=
&
This
->
lpvtblIPersistStorage
;
...
...
dlls/ole32/errorinfo.c
View file @
0449701c
...
...
@@ -95,7 +95,7 @@ static BSTR ERRORINFO_SysAllocString(const OLECHAR* in)
stringBuffer
=
(
WCHAR
*
)
newBuffer
;
stringBuffer
[
len
]
=
0
;
return
(
LPWSTR
)
stringBuffer
;
return
stringBuffer
;
}
/* this code is from SysFreeString (ole2disp.c in oleaut32)*/
...
...
@@ -163,9 +163,9 @@ static inline ErrorInfoImpl *impl_from_ISupportErrorInfo( ISupportErrorInfo *ifa
/*
converts This to an object pointer
*/
#define _IErrorInfo_(This)
(IErrorInfo*)&(This
->lpvtei)
#define _ICreateErrorInfo_(This)
(ICreateErrorInfo*)&(This
->lpvtcei)
#define _ISupportErrorInfo_(This)
(ISupportErrorInfo*)&(This
->lpvtsei)
#define _IErrorInfo_(This)
((IErrorInfo*)&(This)
->lpvtei)
#define _ICreateErrorInfo_(This)
(&(This)
->lpvtcei)
#define _ISupportErrorInfo_(This)
(&(This)
->lpvtsei)
static
IErrorInfo
*
IErrorInfoImpl_Constructor
(
void
)
{
...
...
dlls/ole32/filemoniker.c
View file @
0449701c
...
...
@@ -92,7 +92,7 @@ FileMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject)
*
ppvObject
=
iface
;
else
if
(
IsEqualIID
(
&
IID_IROTData
,
riid
))
*
ppvObject
=
(
IROTData
*
)
&
(
This
->
lpvtbl2
)
;
*
ppvObject
=
&
This
->
lpvtbl2
;
else
if
(
IsEqualIID
(
&
IID_IMarshal
,
riid
))
{
HRESULT
hr
=
S_OK
;
...
...
@@ -560,7 +560,7 @@ FileMonikerImpl_BindToObject(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLeft
/* get the requested interface from the loaded class */
res
=
IUnknown_QueryInterface
(
pObj
,
riid
,
ppvResult
);
IBindCtx_RegisterObjectBound
(
pbc
,
(
IUnknown
*
)
*
ppvResult
);
IBindCtx_RegisterObjectBound
(
pbc
,
*
ppvResult
);
IUnknown_Release
(
pObj
);
}
...
...
dlls/ole32/ftmarshal.c
View file @
0449701c
...
...
@@ -46,8 +46,8 @@ typedef struct _FTMarshalImpl {
IUnknown
*
pUnkOuter
;
}
FTMarshalImpl
;
#define _IFTMUnknown_(This)
(IUnknown*)&(This
->lpVtbl)
#define _IFTMarshal_(This)
(IMarshal*)&(This
->lpvtblFTM)
#define _IFTMUnknown_(This)
((IUnknown*)&(This)
->lpVtbl)
#define _IFTMarshal_(This)
(&(This)
->lpvtblFTM)
static
inline
FTMarshalImpl
*
impl_from_IMarshal
(
IMarshal
*
iface
)
{
...
...
dlls/ole32/git.c
View file @
0449701c
...
...
@@ -308,7 +308,7 @@ GITCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid, LPVOID *ppv)
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IGlobalInterfaceTable
))
{
*
ppv
=
(
LPVOID
)
iface
;
*
ppv
=
iface
;
return
S_OK
;
}
return
E_NOINTERFACE
;
...
...
dlls/ole32/hglobalstream.c
View file @
0449701c
...
...
@@ -151,7 +151,7 @@ static HRESULT WINAPI HGLOBALStreamImpl_QueryInterface(
IsEqualIID
(
&
IID_ISequentialStream
,
riid
)
||
IsEqualIID
(
&
IID_IStream
,
riid
))
{
*
ppvObject
=
(
IStream
*
)
This
;
*
ppvObject
=
This
;
}
/*
...
...
dlls/ole32/ifs.c
View file @
0449701c
...
...
@@ -148,7 +148,7 @@ static HRESULT WINAPI IMalloc_fnQueryInterface(LPMALLOC iface,REFIID refiid,LPVO
TRACE
(
"(%s,%p)
\n
"
,
debugstr_guid
(
refiid
),
obj
);
if
(
IsEqualIID
(
&
IID_IUnknown
,
refiid
)
||
IsEqualIID
(
&
IID_IMalloc
,
refiid
))
{
*
obj
=
(
LPMALLOC
)
&
Malloc32
;
*
obj
=
&
Malloc32
;
return
S_OK
;
}
return
E_NOINTERFACE
;
...
...
@@ -383,7 +383,7 @@ static HRESULT WINAPI IMallocSpy_fnQueryInterface(LPMALLOCSPY iface,REFIID refii
TRACE
(
"(%s,%p)
\n
"
,
debugstr_guid
(
refiid
),
obj
);
if
(
IsEqualIID
(
&
IID_IUnknown
,
refiid
)
||
IsEqualIID
(
&
IID_IMallocSpy
,
refiid
))
{
*
obj
=
(
LPMALLOC
)
&
MallocSpy
;
*
obj
=
&
MallocSpy
;
return
S_OK
;
}
return
E_NOINTERFACE
;
...
...
dlls/ole32/itemmoniker.c
View file @
0449701c
...
...
@@ -176,7 +176,7 @@ HRESULT WINAPI ItemMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,void**
*
ppvObject
=
iface
;
else
if
(
IsEqualIID
(
&
IID_IROTData
,
riid
))
*
ppvObject
=
(
IROTData
*
)
&
(
This
->
lpvtbl2
)
;
*
ppvObject
=
&
This
->
lpvtbl2
;
else
if
(
IsEqualIID
(
&
IID_IMarshal
,
riid
))
{
HRESULT
hr
=
S_OK
;
...
...
dlls/ole32/marshal.c
View file @
0449701c
...
...
@@ -216,7 +216,7 @@ static HRESULT WINAPI ClientIdentity_QueryInterface(IMultiQI * iface, REFIID rii
mqi
.
pIID
=
riid
;
hr
=
IMultiQI_QueryMultipleInterfaces
(
iface
,
1
,
&
mqi
);
*
ppv
=
(
void
*
)
mqi
.
pItf
;
*
ppv
=
mqi
.
pItf
;
return
hr
;
}
...
...
@@ -837,19 +837,19 @@ static HRESULT proxy_manager_query_local_interface(struct proxy_manager * This,
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IMultiQI
))
{
*
ppv
=
(
void
*
)
&
This
->
lpVtbl
;
*
ppv
=
&
This
->
lpVtbl
;
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
if
(
IsEqualIID
(
riid
,
&
IID_IMarshal
))
{
*
ppv
=
(
void
*
)
&
This
->
lpVtblMarshal
;
*
ppv
=
&
This
->
lpVtblMarshal
;
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
if
(
IsEqualIID
(
riid
,
&
IID_IClientSecurity
))
{
*
ppv
=
(
void
*
)
&
This
->
lpVtblCliSec
;
*
ppv
=
&
This
->
lpVtblCliSec
;
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
...
...
@@ -890,7 +890,7 @@ static HRESULT proxy_manager_create_ifproxy(
* proxy associated with the ifproxy as we handle IUnknown ourselves */
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
ifproxy
->
iface
=
(
void
*
)
&
This
->
lpVtbl
;
ifproxy
->
iface
=
&
This
->
lpVtbl
;
IMultiQI_AddRef
((
IMultiQI
*
)
&
This
->
lpVtbl
);
hr
=
S_OK
;
}
...
...
@@ -1213,7 +1213,7 @@ StdMarshalImpl_MarshalInterface(
/* make sure this apartment can be reached from other threads / processes */
RPC_StartRemoting
(
apt
);
hres
=
marshal_object
(
apt
,
&
stdobjref
,
riid
,
(
IUnknown
*
)
pv
,
mshlflags
);
hres
=
marshal_object
(
apt
,
&
stdobjref
,
riid
,
pv
,
mshlflags
);
if
(
hres
)
{
ERR
(
"Failed to create ifstub, hres=0x%x
\n
"
,
hres
);
...
...
@@ -1973,7 +1973,7 @@ static HRESULT WINAPI StdMarshalCF_QueryInterface(LPCLASSFACTORY iface,
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IClassFactory
))
{
*
ppv
=
(
LPVOID
)
iface
;
*
ppv
=
iface
;
return
S_OK
;
}
return
E_NOINTERFACE
;
...
...
dlls/ole32/memlockbytes.c
View file @
0449701c
...
...
@@ -289,7 +289,7 @@ static HRESULT WINAPI HGLOBALLockBytesImpl_QueryInterface(
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_ILockBytes
))
{
*
ppvObject
=
(
ILockBytes
*
)
This
;
*
ppvObject
=
This
;
}
/*
...
...
dlls/ole32/moniker.c
View file @
0449701c
...
...
@@ -316,7 +316,7 @@ RunningObjectTableImpl_QueryInterface(IRunningObjectTable* iface,
if
(
IsEqualIID
(
&
IID_IUnknown
,
riid
)
||
IsEqualIID
(
&
IID_IRunningObjectTable
,
riid
))
*
ppvObject
=
(
IRunningObjectTable
*
)
This
;
*
ppvObject
=
This
;
if
((
*
ppvObject
)
==
0
)
return
E_NOINTERFACE
;
...
...
@@ -1291,10 +1291,10 @@ static HRESULT WINAPI EnumMonikerImpl_QueryInterface(IEnumMoniker* iface,REFIID
*
ppvObject
=
NULL
;
if
(
IsEqualIID
(
&
IID_IUnknown
,
riid
))
*
ppvObject
=
(
IEnumMoniker
*
)
This
;
*
ppvObject
=
This
;
else
if
(
IsEqualIID
(
&
IID_IEnumMoniker
,
riid
))
*
ppvObject
=
(
IEnumMoniker
*
)
This
;
*
ppvObject
=
This
;
if
((
*
ppvObject
)
==
NULL
)
return
E_NOINTERFACE
;
...
...
dlls/ole32/ole2.c
View file @
0449701c
...
...
@@ -500,15 +500,10 @@ HRESULT WINAPI DoDragDrop (
trackerInfo
.
curTargetHWND
=
0
;
trackerInfo
.
curDragTarget
=
0
;
hwndTrackWindow
=
CreateWindowA
(
OLEDD_DRAGTRACKERCLASS
,
"TrackerWindow"
,
WS_POPUP
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
0
,
0
,
0
,
(
LPVOID
)
&
trackerInfo
);
hwndTrackWindow
=
CreateWindowA
(
OLEDD_DRAGTRACKERCLASS
,
"TrackerWindow"
,
WS_POPUP
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
0
,
0
,
0
,
&
trackerInfo
);
if
(
hwndTrackWindow
!=
0
)
{
...
...
@@ -2599,7 +2594,7 @@ BSTR WINAPI PropSysAllocString(LPCOLESTR str)
stringBuffer
=
(
WCHAR
*
)
newBuffer
;
stringBuffer
[
len
]
=
'\0'
;
return
(
LPWSTR
)
stringBuffer
;
return
stringBuffer
;
}
/***********************************************************************
...
...
dlls/ole32/oleobj.c
View file @
0449701c
...
...
@@ -256,7 +256,7 @@ static HRESULT WINAPI OleAdviseHolderImpl_QueryInterface(
else
if
(
IsEqualIID
(
riid
,
&
IID_IOleAdviseHolder
))
{
/* IOleAdviseHolder */
*
ppvObj
=
(
IOleAdviseHolder
*
)
This
;
*
ppvObj
=
This
;
}
if
(
*
ppvObj
==
NULL
)
...
...
dlls/ole32/rpc.c
View file @
0449701c
...
...
@@ -440,7 +440,7 @@ static HRESULT WINAPI RpcChannelBuffer_QueryInterface(LPRPCCHANNELBUFFER iface,
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IRpcChannelBuffer
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
ppv
=
(
LPVOID
)
iface
;
*
ppv
=
iface
;
IUnknown_AddRef
(
iface
);
return
S_OK
;
}
...
...
@@ -495,7 +495,7 @@ static HRESULT WINAPI ServerRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface,
TRACE
(
"(%p)->(%p,%s)
\n
"
,
This
,
olemsg
,
debugstr_guid
(
riid
));
message_state
=
(
struct
message_state
*
)
msg
->
Handle
;
message_state
=
msg
->
Handle
;
/* restore the binding handle and the real start of data */
msg
->
Handle
=
message_state
->
binding_handle
;
msg
->
Buffer
=
(
char
*
)
msg
->
Buffer
-
message_state
->
prefix_data_len
;
...
...
@@ -522,7 +522,7 @@ static HRESULT WINAPI ServerRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface,
else
status
=
I_RpcGetBuffer
(
msg
);
orpcthat
=
(
ORPCTHAT
*
)
msg
->
Buffer
;
orpcthat
=
msg
->
Buffer
;
msg
->
Buffer
=
(
char
*
)
msg
->
Buffer
+
FIELD_OFFSET
(
ORPCTHAT
,
extensions
);
orpcthat
->
flags
=
ORPCF_NULL
/* FIXME? */
;
...
...
@@ -702,7 +702,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface,
if
(
status
==
RPC_S_OK
)
{
orpcthis
=
(
ORPCTHIS
*
)
msg
->
Buffer
;
orpcthis
=
msg
->
Buffer
;
msg
->
Buffer
=
(
char
*
)
msg
->
Buffer
+
FIELD_OFFSET
(
ORPCTHIS
,
extensions
);
orpcthis
->
version
.
MajorVersion
=
COM_MAJOR_VERSION
;
...
...
@@ -765,7 +765,7 @@ static HRESULT WINAPI ServerRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac
/* this thread runs an outgoing RPC */
static
DWORD
WINAPI
rpc_sendreceive_thread
(
LPVOID
param
)
{
struct
dispatch_params
*
data
=
(
struct
dispatch_params
*
)
param
;
struct
dispatch_params
*
data
=
param
;
/* Note: I_RpcSendReceive doesn't raise exceptions like the higher-level
* RPC functions do */
...
...
@@ -825,7 +825,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac
return
RPC_E_CANTCALLOUT_ININPUTSYNCCALL
;
}
message_state
=
(
struct
message_state
*
)
msg
->
Handle
;
message_state
=
msg
->
Handle
;
/* restore the binding handle and the real start of data */
msg
->
Handle
=
message_state
->
binding_handle
;
msg
->
Buffer
=
(
char
*
)
msg
->
Buffer
-
message_state
->
prefix_data_len
;
...
...
@@ -950,7 +950,7 @@ static HRESULT WINAPI ServerRpcChannelBuffer_FreeBuffer(LPRPCCHANNELBUFFER iface
TRACE
(
"(%p)
\n
"
,
msg
);
message_state
=
(
struct
message_state
*
)
msg
->
Handle
;
message_state
=
msg
->
Handle
;
/* restore the binding handle and the real start of data */
msg
->
Handle
=
message_state
->
binding_handle
;
msg
->
Buffer
=
(
char
*
)
msg
->
Buffer
-
message_state
->
prefix_data_len
;
...
...
@@ -980,7 +980,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_FreeBuffer(LPRPCCHANNELBUFFER iface
TRACE
(
"(%p)
\n
"
,
msg
);
message_state
=
(
struct
message_state
*
)
msg
->
Handle
;
message_state
=
msg
->
Handle
;
/* restore the binding handle and the real start of data */
msg
->
Handle
=
message_state
->
binding_handle
;
msg
->
Buffer
=
(
char
*
)
msg
->
Buffer
-
message_state
->
prefix_data_len
;
...
...
@@ -1179,7 +1179,7 @@ static HRESULT unmarshal_ORPC_EXTENT_ARRAY(RPC_MESSAGE *msg, const char *end,
return
RPC_S_INVALID_BOUND
;
}
*
first_wire_orpc_extent
=
wire_orpc_extent
=
(
WIRE_ORPC_EXTENT
*
)
msg
->
Buffer
;
*
first_wire_orpc_extent
=
wire_orpc_extent
=
msg
->
Buffer
;
for
(
i
=
0
;
i
<
((
extensions
->
size
+
1
)
&~
1
);
i
++
)
{
if
((
const
char
*
)
&
wire_orpc_extent
->
data
[
0
]
>
end
)
...
...
@@ -1398,7 +1398,7 @@ void RPC_ExecuteCall(struct dispatch_params *params)
HeapFree
(
GetProcessHeap
(),
0
,
original_buffer
);
exit_reset_state:
message_state
=
(
struct
message_state
*
)
msg
->
Handle
;
message_state
=
msg
->
Handle
;
msg
->
Handle
=
message_state
->
binding_handle
;
msg
->
Buffer
=
(
char
*
)
msg
->
Buffer
-
message_state
->
prefix_data_len
;
msg
->
BufferLength
+=
message_state
->
prefix_data_len
;
...
...
@@ -1847,7 +1847,7 @@ struct local_server_params
/* FIXME: should call to rpcss instead */
static
DWORD
WINAPI
local_server_thread
(
LPVOID
param
)
{
struct
local_server_params
*
lsp
=
(
struct
local_server_params
*
)
param
;
struct
local_server_params
*
lsp
=
param
;
HANDLE
hPipe
;
WCHAR
pipefn
[
100
];
HRESULT
hres
;
...
...
dlls/ole32/stg_prop.c
View file @
0449701c
...
...
@@ -927,23 +927,23 @@ static HRESULT WINAPI IPropertyStorage_fnStat(
static
int
PropertyStorage_PropNameCompare
(
const
void
*
a
,
const
void
*
b
,
void
*
extra
)
{
PropertyStorage_impl
*
This
=
(
PropertyStorage_impl
*
)
extra
;
PropertyStorage_impl
*
This
=
extra
;
if
(
This
->
codePage
==
CP_UNICODE
)
{
TRACE
(
"(%s, %s)
\n
"
,
debugstr_w
(
a
),
debugstr_w
(
b
));
if
(
This
->
grfFlags
&
PROPSETFLAG_CASE_SENSITIVE
)
return
lstrcmpW
(
(
LPCWSTR
)
a
,
(
LPCWSTR
)
b
);
return
lstrcmpW
(
a
,
b
);
else
return
lstrcmpiW
(
(
LPCWSTR
)
a
,
(
LPCWSTR
)
b
);
return
lstrcmpiW
(
a
,
b
);
}
else
{
TRACE
(
"(%s, %s)
\n
"
,
debugstr_a
(
a
),
debugstr_a
(
b
));
if
(
This
->
grfFlags
&
PROPSETFLAG_CASE_SENSITIVE
)
return
lstrcmpA
(
(
LPCSTR
)
a
,
(
LPCSTR
)
b
);
return
lstrcmpA
(
a
,
b
);
else
return
lstrcmpiA
(
(
LPCSTR
)
a
,
(
LPCSTR
)
b
);
return
lstrcmpiA
(
a
,
b
);
}
}
...
...
@@ -961,7 +961,7 @@ static int PropertyStorage_PropCompare(const void *a, const void *b,
static
void
PropertyStorage_PropertyDestroy
(
void
*
k
,
void
*
d
,
void
*
extra
)
{
PropVariantClear
(
(
PROPVARIANT
*
)
d
);
PropVariantClear
(
d
);
HeapFree
(
GetProcessHeap
(),
0
,
d
);
}
...
...
@@ -1486,8 +1486,8 @@ struct DictionaryClosure
static
BOOL
PropertyStorage_DictionaryWriter
(
const
void
*
key
,
const
void
*
value
,
void
*
extra
,
void
*
closure
)
{
PropertyStorage_impl
*
This
=
(
PropertyStorage_impl
*
)
extra
;
struct
DictionaryClosure
*
c
=
(
struct
DictionaryClosure
*
)
closure
;
PropertyStorage_impl
*
This
=
extra
;
struct
DictionaryClosure
*
c
=
closure
;
DWORD
propid
;
ULONG
count
;
...
...
@@ -1756,8 +1756,8 @@ struct PropertyClosure
static
BOOL
PropertyStorage_PropertiesWriter
(
const
void
*
key
,
const
void
*
value
,
void
*
extra
,
void
*
closure
)
{
PropertyStorage_impl
*
This
=
(
PropertyStorage_impl
*
)
extra
;
struct
PropertyClosure
*
c
=
(
struct
PropertyClosure
*
)
closure
;
PropertyStorage_impl
*
This
=
extra
;
struct
PropertyClosure
*
c
=
closure
;
assert
(
key
);
assert
(
value
);
...
...
dlls/ole32/stg_stream.c
View file @
0449701c
...
...
@@ -126,7 +126,7 @@ static HRESULT WINAPI StgStreamImpl_QueryInterface(
IsEqualIID
(
&
IID_ISequentialStream
,
riid
)
||
IsEqualIID
(
&
IID_IStream
,
riid
))
{
*
ppvObject
=
(
IStream
*
)
This
;
*
ppvObject
=
This
;
}
/*
...
...
dlls/ole32/storage.c
View file @
0449701c
...
...
@@ -1287,7 +1287,7 @@ HRESULT CDECL IStream16_fnWrite(
BYTE
block
[
BIGSIZE
];
ULONG
*
byteswritten
=
pcbWrite
,
xxwritten
;
int
oldsize
,
newsize
,
i
,
curoffset
=
0
,
lastblocknr
,
blocknr
,
cc
;
const
BYTE
*
pbv
=
(
const
BYTE
*
)
pv
;
const
BYTE
*
pbv
=
pv
;
if
(
!
pcbWrite
)
byteswritten
=&
xxwritten
;
*
byteswritten
=
0
;
...
...
dlls/ole32/storage32.c
View file @
0449701c
...
...
@@ -314,11 +314,11 @@ static HRESULT WINAPI StorageBaseImpl_QueryInterface(
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
||
IsEqualGUID
(
&
IID_IStorage
,
riid
))
{
*
ppvObject
=
(
IStorage
*
)
This
;
*
ppvObject
=
This
;
}
else
if
(
IsEqualGUID
(
&
IID_IPropertySetStorage
,
riid
))
{
*
ppvObject
=
(
IStorage
*
)
&
This
->
pssVtbl
;
*
ppvObject
=
&
This
->
pssVtbl
;
}
/*
...
...
@@ -2041,13 +2041,8 @@ static HRESULT deleteStreamProperty(
size
.
u
.
HighPart
=
0
;
size
.
u
.
LowPart
=
0
;
hr
=
StorageBaseImpl_OpenStream
(
(
IStorage
*
)
parentStorage
,
(
OLECHAR
*
)
propertyToDelete
.
name
,
NULL
,
STGM_WRITE
|
STGM_SHARE_EXCLUSIVE
,
0
,
&
pis
);
hr
=
StorageBaseImpl_OpenStream
((
IStorage
*
)
parentStorage
,
propertyToDelete
.
name
,
NULL
,
STGM_WRITE
|
STGM_SHARE_EXCLUSIVE
,
0
,
&
pis
);
if
(
hr
!=
S_OK
)
{
...
...
@@ -3693,7 +3688,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_QueryInterface(
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
||
IsEqualGUID
(
&
IID_IEnumSTATSTG
,
riid
))
{
*
ppvObject
=
(
IEnumSTATSTG
*
)
This
;
*
ppvObject
=
This
;
IEnumSTATSTG_AddRef
((
IEnumSTATSTG
*
)
This
);
return
S_OK
;
}
...
...
@@ -4031,8 +4026,7 @@ static ULONG IEnumSTATSTGImpl_FindProperty(
currentSearchNode
,
currentProperty
);
if
(
propertyNameCmp
(
(
const
OLECHAR
*
)
currentProperty
->
name
,
lpszPropName
)
==
0
)
if
(
propertyNameCmp
(
currentProperty
->
name
,
lpszPropName
)
==
0
)
return
currentSearchNode
;
/*
...
...
@@ -4344,7 +4338,7 @@ void StorageUtl_CopyPropertyToSTATSTG(
destination
->
pwcsName
=
CoTaskMemAlloc
((
lstrlenW
(
source
->
name
)
+
1
)
*
sizeof
(
WCHAR
));
strcpyW
(
(
LPWSTR
)
destination
->
pwcsName
,
source
->
name
);
strcpyW
(
destination
->
pwcsName
,
source
->
name
);
}
switch
(
source
->
propertyType
)
...
...
@@ -4633,7 +4627,7 @@ HRESULT BlockChainStream_WriteAt(BlockChainStream* This,
}
*
bytesWritten
=
0
;
bufferWalker
=
(
const
BYTE
*
)
buffer
;
bufferWalker
=
buffer
;
while
(
(
size
>
0
)
&&
(
blockIndex
!=
BLOCK_END_OF_CHAIN
)
)
{
...
...
@@ -5368,7 +5362,7 @@ HRESULT SmallBlockChainStream_WriteAt(
* This is OK since we don't intend to modify that buffer.
*/
*
bytesWritten
=
0
;
bufferWalker
=
(
const
BYTE
*
)
buffer
;
bufferWalker
=
buffer
;
while
(
(
size
>
0
)
&&
(
blockIndex
!=
BLOCK_END_OF_CHAIN
)
)
{
/*
...
...
@@ -6632,7 +6626,7 @@ static HRESULT OLECONVERT_LoadOLE10(LPOLESTREAM pOleStream, OLECONVERT_OLESTREAM
if
(
pData
->
dwOleTypeNameLength
>
0
)
{
/* Get the OleTypeName */
dwSize
=
pOleStream
->
lpstbl
->
Get
(
pOleStream
,
(
void
*
)
pData
->
strOleTypeName
,
pData
->
dwOleTypeNameLength
);
dwSize
=
pOleStream
->
lpstbl
->
Get
(
pOleStream
,
pData
->
strOleTypeName
,
pData
->
dwOleTypeNameLength
);
if
(
dwSize
!=
pData
->
dwOleTypeNameLength
)
{
hRes
=
CONVERT10_E_OLESTREAM_GET
;
...
...
@@ -6653,7 +6647,7 @@ static HRESULT OLECONVERT_LoadOLE10(LPOLESTREAM pOleStream, OLECONVERT_OLESTREAM
pData
->
pstrOleObjFileName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
pData
->
dwOleObjFileNameLength
);
if
(
pData
->
pstrOleObjFileName
)
{
dwSize
=
pOleStream
->
lpstbl
->
Get
(
pOleStream
,
(
void
*
)(
pData
->
pstrOleObjFileName
),
pData
->
dwOleObjFileNameLength
);
dwSize
=
pOleStream
->
lpstbl
->
Get
(
pOleStream
,
pData
->
pstrOleObjFileName
,
pData
->
dwOleObjFileNameLength
);
if
(
dwSize
!=
pData
->
dwOleObjFileNameLength
)
{
hRes
=
CONVERT10_E_OLESTREAM_GET
;
...
...
@@ -6696,7 +6690,7 @@ static HRESULT OLECONVERT_LoadOLE10(LPOLESTREAM pOleStream, OLECONVERT_OLESTREAM
if
(
!
bStrem1
)
/* if it is a second OLE stream data */
{
pData
->
dwDataLength
-=
8
;
dwSize
=
pOleStream
->
lpstbl
->
Get
(
pOleStream
,
(
void
*
)(
pData
->
strUnknown
)
,
sizeof
(
pData
->
strUnknown
));
dwSize
=
pOleStream
->
lpstbl
->
Get
(
pOleStream
,
pData
->
strUnknown
,
sizeof
(
pData
->
strUnknown
));
if
(
dwSize
!=
sizeof
(
pData
->
strUnknown
))
{
hRes
=
CONVERT10_E_OLESTREAM_GET
;
...
...
@@ -6783,7 +6777,7 @@ static HRESULT OLECONVERT_SaveOLE10(OLECONVERT_OLESTREAM_DATA *pData, LPOLESTREA
if
(
pData
->
dwOleTypeNameLength
>
0
)
{
/* Set the OleTypeName */
dwSize
=
pOleStream
->
lpstbl
->
Put
(
pOleStream
,
(
void
*
)
pData
->
strOleTypeName
,
pData
->
dwOleTypeNameLength
);
dwSize
=
pOleStream
->
lpstbl
->
Put
(
pOleStream
,
pData
->
strOleTypeName
,
pData
->
dwOleTypeNameLength
);
if
(
dwSize
!=
pData
->
dwOleTypeNameLength
)
{
hRes
=
CONVERT10_E_OLESTREAM_PUT
;
...
...
dlls/ole32/stubmanager.c
View file @
0449701c
...
...
@@ -606,7 +606,7 @@ static HRESULT WINAPI RemUnknown_QueryInterface(IRemUnknown *iface, REFIID riid,
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IRemUnknown
))
{
*
ppv
=
(
LPVOID
)
iface
;
*
ppv
=
iface
;
IRemUnknown_AddRef
(
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