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
4a5eca88
Commit
4a5eca88
authored
Jul 27, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Use proper helpers for iface calls.
parent
d2fe8b70
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
41 deletions
+35
-41
oleaut.c
dlls/oleaut32/oleaut.c
+1
-1
olefont.c
dlls/oleaut32/olefont.c
+4
-4
tmarshal.c
dlls/oleaut32/tmarshal.c
+6
-6
typelib.c
dlls/oleaut32/typelib.c
+18
-24
typelib2.c
dlls/oleaut32/typelib2.c
+6
-6
No files found.
dlls/oleaut32/oleaut.c
View file @
4a5eca88
...
...
@@ -736,7 +736,7 @@ static HRESULT WINAPI PSDispatchFacBuf_QueryInterface(IPSFactoryBuffer *iface, R
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IPSFactoryBuffer
))
{
I
Unknown
_AddRef
(
iface
);
I
PSFactoryBuffer
_AddRef
(
iface
);
*
ppv
=
iface
;
return
S_OK
;
}
...
...
dlls/oleaut32/olefont.c
View file @
4a5eca88
...
...
@@ -441,11 +441,11 @@ static void OLEFont_SendNotify(OLEFontImpl* this, DISPID dispID)
IFontEventsDisp
*
disp
;
IUnknown_QueryInterface
(
CD
.
pUnk
,
&
IID_IFontEventsDisp
,
(
LPVOID
)
&
disp
);
I
Dispatch
_Invoke
(
disp
,
DISPID_FONT_CHANGED
,
&
IID_NULL
,
LOCALE_NEUTRAL
,
INVOKE_FUNC
,
&
dispparams
,
NULL
,
NULL
,
NULL
);
I
FontEventsDisp
_Invoke
(
disp
,
DISPID_FONT_CHANGED
,
&
IID_NULL
,
LOCALE_NEUTRAL
,
INVOKE_FUNC
,
&
dispparams
,
NULL
,
NULL
,
NULL
);
I
Dispatch
_Release
(
disp
);
I
FontEventsDisp
_Release
(
disp
);
IUnknown_Release
(
CD
.
pUnk
);
}
VariantClear
(
&
vararg
);
...
...
dlls/oleaut32/tmarshal.c
View file @
4a5eca88
...
...
@@ -246,7 +246,7 @@ _marshal_interface(marshal_state *buf, REFIID riid, LPUNKNOWN pUnk) {
fail:
xsize
=
0
;
xbuf_add
(
buf
,(
LPBYTE
)
&
xsize
,
sizeof
(
xsize
));
if
(
pStm
)
I
Unknown
_Release
(
pStm
);
if
(
pStm
)
I
Stream
_Release
(
pStm
);
HeapFree
(
GetProcessHeap
(),
0
,
tempbuf
);
return
hres
;
}
...
...
@@ -848,7 +848,7 @@ serialize_param(
ELEMDESC
*
elem2
;
TYPEDESC
*
tdesc2
;
hres
=
ITypeInfo
2
_GetVarDesc
(
tinfo2
,
i
,
&
vdesc
);
hres
=
ITypeInfo_GetVarDesc
(
tinfo2
,
i
,
&
vdesc
);
if
(
hres
)
{
ERR
(
"Could not get vardesc of %d
\n
"
,
i
);
return
hres
;
...
...
@@ -1138,7 +1138,7 @@ deserialize_param(
for
(
i
=
0
;
i
<
tattr
->
cVars
;
i
++
)
{
VARDESC
*
vdesc
;
hres
=
ITypeInfo
2
_GetVarDesc
(
tinfo2
,
i
,
&
vdesc
);
hres
=
ITypeInfo_GetVarDesc
(
tinfo2
,
i
,
&
vdesc
);
if
(
hres
)
{
ERR
(
"Could not get vardesc of %d
\n
"
,
i
);
ITypeInfo_ReleaseTypeAttr
(
tinfo2
,
tattr
);
...
...
@@ -1154,7 +1154,7 @@ deserialize_param(
(
DWORD
*
)(((
LPBYTE
)
arg
)
+
vdesc
->
u
.
oInst
),
buf
);
ITypeInfo
2
_ReleaseVarDesc
(
tinfo2
,
vdesc
);
ITypeInfo_ReleaseVarDesc
(
tinfo2
,
vdesc
);
if
(
debugout
&&
(
i
<
tattr
->
cVars
-
1
))
TRACE_
(
olerelay
)(
","
);
}
if
(
debugout
)
TRACE_
(
olerelay
)(
"}"
);
...
...
@@ -1604,13 +1604,13 @@ static inline TMarshalDispatchChannel *impl_from_IRpcChannelBuffer(IRpcChannelBu
return
CONTAINING_RECORD
(
iface
,
TMarshalDispatchChannel
,
IRpcChannelBuffer_iface
);
}
static
HRESULT
WINAPI
TMarshalDispatchChannel_QueryInterface
(
LPRPCCHANNELBUFFER
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
static
HRESULT
WINAPI
TMarshalDispatchChannel_QueryInterface
(
IRpcChannelBuffer
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IRpcChannelBuffer
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
ppv
=
iface
;
I
Unknown
_AddRef
(
iface
);
I
RpcChannelBuffer
_AddRef
(
iface
);
return
S_OK
;
}
return
E_NOINTERFACE
;
...
...
dlls/oleaut32/typelib.c
View file @
4a5eca88
...
...
@@ -446,7 +446,7 @@ HRESULT WINAPI LoadTypeLibEx(
case
REGKIND_REGISTER
:
if
(
FAILED
(
res
=
RegisterTypeLib
(
*
pptLib
,
szPath
,
NULL
)))
{
I
Unknown
_Release
(
*
pptLib
);
I
TypeLib
_Release
(
*
pptLib
);
*
pptLib
=
0
;
}
break
;
...
...
@@ -2913,7 +2913,7 @@ static HRESULT TLB_ReadTypeLib(LPCWSTR pszFileName, LPWSTR pszPath, UINT cchPath
{
TRACE
(
"cache hit
\n
"
);
*
ppTypeLib
=
(
ITypeLib2
*
)
entry
;
ITypeLib_AddRef
(
*
ppTypeLib
);
ITypeLib
2
_AddRef
(
*
ppTypeLib
);
LeaveCriticalSection
(
&
cache_section
);
return
S_OK
;
}
...
...
@@ -4828,7 +4828,7 @@ static HRESULT WINAPI ITypeLibComp_fnQueryInterface(ITypeComp * iface, REFIID ri
{
ITypeLibImpl
*
This
=
impl_from_ITypeComp
(
iface
);
return
ITypeLib2_QueryInterface
((
ITypeLib
*
)
This
,
riid
,
ppv
);
return
ITypeLib2_QueryInterface
((
ITypeLib
2
*
)
This
,
riid
,
ppv
);
}
static
ULONG
WINAPI
ITypeLibComp_fnAddRef
(
ITypeComp
*
iface
)
...
...
@@ -5068,7 +5068,7 @@ static HRESULT WINAPI ITypeInfo_fnQueryInterface(
*
ppvObject
=
This
;
if
(
*
ppvObject
){
ITypeInfo_AddRef
(
iface
);
ITypeInfo
2
_AddRef
(
iface
);
TRACE
(
"-- Interface: (%p)->(%p)
\n
"
,
ppvObject
,
*
ppvObject
);
return
S_OK
;
}
...
...
@@ -5598,8 +5598,7 @@ static HRESULT WINAPI ITypeInfo_fnGetNames( ITypeInfo2 *iface, MEMBERID memid,
/* recursive search */
ITypeInfo
*
pTInfo
;
HRESULT
result
;
result
=
ITypeInfo_GetRefTypeInfo
(
iface
,
This
->
impltypes
[
0
].
hRef
,
&
pTInfo
);
result
=
ITypeInfo2_GetRefTypeInfo
(
iface
,
This
->
impltypes
[
0
].
hRef
,
&
pTInfo
);
if
(
SUCCEEDED
(
result
))
{
result
=
ITypeInfo_GetNames
(
pTInfo
,
memid
,
rgBstrNames
,
cMaxNames
,
pcNames
);
...
...
@@ -5751,8 +5750,7 @@ static HRESULT WINAPI ITypeInfo_fnGetIDsOfNames( ITypeInfo2 *iface,
if
(
This
->
impltypes
)
{
/* recursive search */
ITypeInfo
*
pTInfo
;
ret
=
ITypeInfo_GetRefTypeInfo
(
iface
,
This
->
impltypes
[
0
].
hRef
,
&
pTInfo
);
ret
=
ITypeInfo2_GetRefTypeInfo
(
iface
,
This
->
impltypes
[
0
].
hRef
,
&
pTInfo
);
if
(
SUCCEEDED
(
ret
)){
ret
=
ITypeInfo_GetIDsOfNames
(
pTInfo
,
rgszNames
,
cNames
,
pMemId
);
ITypeInfo_Release
(
pTInfo
);
...
...
@@ -6750,7 +6748,7 @@ func_fail:
if
(
This
->
impltypes
)
{
/* recursive search */
ITypeInfo
*
pTInfo
;
hres
=
ITypeInfo_GetRefTypeInfo
(
iface
,
This
->
impltypes
[
0
].
hRef
,
&
pTInfo
);
hres
=
ITypeInfo
2
_GetRefTypeInfo
(
iface
,
This
->
impltypes
[
0
].
hRef
,
&
pTInfo
);
if
(
SUCCEEDED
(
hres
)){
hres
=
ITypeInfo_Invoke
(
pTInfo
,
pIUnk
,
memid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
pArgErr
);
ITypeInfo_Release
(
pTInfo
);
...
...
@@ -6818,8 +6816,7 @@ static HRESULT WINAPI ITypeInfo_fnGetDocumentation( ITypeInfo2 *iface,
/* recursive search */
ITypeInfo
*
pTInfo
;
HRESULT
result
;
result
=
ITypeInfo_GetRefTypeInfo
(
iface
,
This
->
impltypes
[
0
].
hRef
,
&
pTInfo
);
result
=
ITypeInfo2_GetRefTypeInfo
(
iface
,
This
->
impltypes
[
0
].
hRef
,
&
pTInfo
);
if
(
SUCCEEDED
(
result
))
{
result
=
ITypeInfo_GetDocumentation
(
pTInfo
,
memid
,
pBstrName
,
pBstrDocString
,
pdwHelpContext
,
pBstrHelpFile
);
...
...
@@ -6983,12 +6980,12 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo(
if
(
ref_type
->
pImpTLInfo
==
TLB_REF_INTERNAL
)
{
UINT
Index
;
result
=
ITypeInfo_GetContainingTypeLib
(
iface
,
&
pTLib
,
&
Index
);
result
=
ITypeInfo
2
_GetContainingTypeLib
(
iface
,
&
pTLib
,
&
Index
);
}
else
{
if
(
ref_type
->
pImpTLInfo
->
pImpTypeLib
)
{
TRACE
(
"typeinfo in imported typelib that is already loaded
\n
"
);
pTLib
=
(
ITypeLib
*
)
ref_type
->
pImpTLInfo
->
pImpTypeLib
;
ITypeLib2
_AddRef
(
pTLib
);
ITypeLib
_AddRef
(
pTLib
);
result
=
S_OK
;
}
else
{
TRACE
(
"typeinfo in imported typelib that isn't already loaded
\n
"
);
...
...
@@ -7005,21 +7002,18 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo(
}
if
(
SUCCEEDED
(
result
))
{
ref_type
->
pImpTLInfo
->
pImpTypeLib
=
(
ITypeLibImpl
*
)
pTLib
;
ITypeLib2
_AddRef
(
pTLib
);
ITypeLib
_AddRef
(
pTLib
);
}
}
}
if
(
SUCCEEDED
(
result
))
{
if
(
ref_type
->
index
==
TLB_REF_USE_GUID
)
result
=
ITypeLib2_GetTypeInfoOfGuid
(
pTLib
,
&
ref_type
->
guid
,
ppTInfo
);
result
=
ITypeLib_GetTypeInfoOfGuid
(
pTLib
,
&
ref_type
->
guid
,
ppTInfo
);
else
result
=
ITypeLib2_GetTypeInfo
(
pTLib
,
ref_type
->
index
,
ppTInfo
);
result
=
ITypeLib_GetTypeInfo
(
pTLib
,
ref_type
->
index
,
ppTInfo
);
}
if
(
pTLib
!=
NULL
)
ITypeLib2
_Release
(
pTLib
);
ITypeLib
_Release
(
pTLib
);
}
}
...
...
@@ -7045,7 +7039,7 @@ static HRESULT WINAPI ITypeInfo_fnAddressOfMember( ITypeInfo2 *iface,
TRACE
(
"(%p)->(0x%x, 0x%x, %p)
\n
"
,
This
,
memid
,
invKind
,
ppv
);
hr
=
ITypeInfo_GetDllEntry
(
iface
,
memid
,
invKind
,
&
dll
,
&
entry
,
&
ordinal
);
hr
=
ITypeInfo
2
_GetDllEntry
(
iface
,
memid
,
invKind
,
&
dll
,
&
entry
,
&
ordinal
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
@@ -7110,7 +7104,7 @@ static HRESULT WINAPI ITypeInfo_fnCreateInstance( ITypeInfo2 *iface,
return
CLASS_E_NOAGGREGATION
;
}
hr
=
ITypeInfo_GetTypeAttr
(
iface
,
&
pTA
);
hr
=
ITypeInfo
2
_GetTypeAttr
(
iface
,
&
pTA
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
pTA
->
typekind
!=
TKIND_COCLASS
)
...
...
@@ -7139,7 +7133,7 @@ static HRESULT WINAPI ITypeInfo_fnCreateInstance( ITypeInfo2 *iface,
riid
,
ppvObj
);
end:
ITypeInfo_ReleaseTypeAttr
(
iface
,
pTA
);
ITypeInfo
2
_ReleaseTypeAttr
(
iface
,
pTA
);
return
hr
;
}
...
...
@@ -7174,7 +7168,7 @@ static HRESULT WINAPI ITypeInfo_fnGetContainingTypeLib( ITypeInfo2 *iface,
if
(
ppTLib
)
{
*
ppTLib
=
(
LPTYPELIB
)(
This
->
pTypeLib
);
ITypeLib
2
_AddRef
(
*
ppTLib
);
ITypeLib_AddRef
(
*
ppTLib
);
TRACE
(
"returning ppTLib=%p
\n
"
,
*
ppTLib
);
}
...
...
dlls/oleaut32/typelib2.c
View file @
4a5eca88
...
...
@@ -1488,7 +1488,7 @@ static HRESULT ctl2_find_typeinfo_from_offset(
for
(
typeinfo
=
This
->
typeinfos
;
typeinfo
;
typeinfo
=
typeinfo
->
next_typeinfo
)
{
if
(
typeinfo
->
typeinfo
==
typeinfodata
)
{
*
ppTinfo
=
(
ITypeInfo
*
)
&
typeinfo
->
ITypeInfo2_iface
;
ITypeInfo
2
_AddRef
(
*
ppTinfo
);
ITypeInfo_AddRef
(
*
ppTinfo
);
return
S_OK
;
}
}
...
...
@@ -2663,7 +2663,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut(
ITypeInfo
*
cur
,
*
next
;
TYPEATTR
*
typeattr
;
hres
=
ICreateTypeInfo_QueryInterface
(
iface
,
&
IID_ITypeInfo
,
(
void
**
)
&
next
);
hres
=
ICreateTypeInfo
2
_QueryInterface
(
iface
,
&
IID_ITypeInfo
,
(
void
**
)
&
next
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -2712,7 +2712,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut(
ITypeInfo
*
cur
,
*
inherited
;
TYPEATTR
*
typeattr
;
hres
=
ICreateTypeInfo_QueryInterface
(
iface
,
&
IID_ITypeInfo
,
(
void
**
)
&
cur
);
hres
=
ICreateTypeInfo
2
_QueryInterface
(
iface
,
&
IID_ITypeInfo
,
(
void
**
)
&
cur
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -3202,7 +3202,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetTypeAttr(
if
(
!
ppTypeAttr
)
return
E_INVALIDARG
;
hres
=
ICreateTypeInfo_LayOut
(
&
This
->
ICreateTypeInfo2_iface
);
hres
=
ICreateTypeInfo
2
_LayOut
(
&
This
->
ICreateTypeInfo2_iface
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -3653,7 +3653,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetRefTypeInfo(
if
(
This
->
typelib
->
typelib_typeinfo_offsets
[
i
]
==
(
hRefType
&
(
~
0x3
)))
{
*
ppTInfo
=
(
ITypeInfo
*
)
&
iter
->
ITypeInfo2_iface
;
IType
Lib
_AddRef
(
*
ppTInfo
);
IType
Info
_AddRef
(
*
ppTInfo
);
return
S_OK
;
}
i
++
;
...
...
@@ -4959,7 +4959,7 @@ static HRESULT WINAPI ITypeLib2_fnGetDocumentation(
if
(
!
iter
)
return
TYPE_E_ELEMENTNOTFOUND
;
return
ITypeInfo_GetDocumentation
(
&
iter
->
ITypeInfo2_iface
,
return
ITypeInfo
2
_GetDocumentation
(
&
iter
->
ITypeInfo2_iface
,
-
1
,
pBstrName
,
pBstrDocString
,
pdwHelpContext
,
pBstrHelpFile
);
}
...
...
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