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
3ed8ffcc
Commit
3ed8ffcc
authored
Oct 08, 2008
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Use the right FAILED/SUCCEEDED macro instead of negating the opposite.
parent
f6baf976
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
clipboard.c
dlls/ole32/clipboard.c
+1
-1
filemoniker.c
dlls/ole32/filemoniker.c
+8
-8
storage32.c
dlls/ole32/storage32.c
+4
-4
No files found.
dlls/ole32/clipboard.c
View file @
3ed8ffcc
...
@@ -956,7 +956,7 @@ static HRESULT OLEClipbrd_RenderFormat(IDataObject *pIDataObject, LPFORMATETC pF
...
@@ -956,7 +956,7 @@ static HRESULT OLEClipbrd_RenderFormat(IDataObject *pIDataObject, LPFORMATETC pF
/* Get the metafile picture out of it */
/* Get the metafile picture out of it */
if
(
!
FAIL
ED
(
hr
=
IDataObject_GetData
(
theOleClipboard
->
pIDataObjectSrc
,
&
fmt2
,
&
std2
)))
if
(
SUCCEED
ED
(
hr
=
IDataObject_GetData
(
theOleClipboard
->
pIDataObjectSrc
,
&
fmt2
,
&
std2
)))
{
{
mfp
=
(
METAFILEPICT
*
)
GlobalLock
(
std2
.
u
.
hGlobal
);
mfp
=
(
METAFILEPICT
*
)
GlobalLock
(
std2
.
u
.
hGlobal
);
}
}
...
...
dlls/ole32/filemoniker.c
View file @
3ed8ffcc
...
@@ -358,12 +358,12 @@ FileMonikerImpl_Save(IMoniker* iface, IStream* pStm, BOOL fClearDirty)
...
@@ -358,12 +358,12 @@ FileMonikerImpl_Save(IMoniker* iface, IStream* pStm, BOOL fClearDirty)
/* write a 0 WORD */
/* write a 0 WORD */
res
=
IStream_Write
(
pStm
,
&
ZERO
,
sizeof
(
WORD
),
NULL
);
res
=
IStream_Write
(
pStm
,
&
ZERO
,
sizeof
(
WORD
),
NULL
);
if
(
!
SUCCEED
ED
(
res
))
return
res
;
if
(
FAIL
ED
(
res
))
return
res
;
/* write length of filePath string ( 0 included )*/
/* write length of filePath string ( 0 included )*/
bytesA
=
WideCharToMultiByte
(
CP_ACP
,
0
,
filePathW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
bytesA
=
WideCharToMultiByte
(
CP_ACP
,
0
,
filePathW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
res
=
IStream_Write
(
pStm
,
&
bytesA
,
sizeof
(
DWORD
),
NULL
);
res
=
IStream_Write
(
pStm
,
&
bytesA
,
sizeof
(
DWORD
),
NULL
);
if
(
!
SUCCEED
ED
(
res
))
return
res
;
if
(
FAIL
ED
(
res
))
return
res
;
/* write A string (with '\0') */
/* write A string (with '\0') */
filePathA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
bytesA
);
filePathA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
bytesA
);
...
@@ -372,17 +372,17 @@ FileMonikerImpl_Save(IMoniker* iface, IStream* pStm, BOOL fClearDirty)
...
@@ -372,17 +372,17 @@ FileMonikerImpl_Save(IMoniker* iface, IStream* pStm, BOOL fClearDirty)
WideCharToMultiByte
(
CP_ACP
,
0
,
filePathW
,
-
1
,
filePathA
,
bytesA
,
NULL
,
&
bUsedDefault
);
WideCharToMultiByte
(
CP_ACP
,
0
,
filePathW
,
-
1
,
filePathA
,
bytesA
,
NULL
,
&
bUsedDefault
);
res
=
IStream_Write
(
pStm
,
filePathA
,
bytesA
,
NULL
);
res
=
IStream_Write
(
pStm
,
filePathA
,
bytesA
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
filePathA
);
HeapFree
(
GetProcessHeap
(),
0
,
filePathA
);
if
(
!
SUCCEED
ED
(
res
))
return
res
;
if
(
FAIL
ED
(
res
))
return
res
;
/* write a DWORD 0xDEADFFFF */
/* write a DWORD 0xDEADFFFF */
res
=
IStream_Write
(
pStm
,
&
DEADFFFF
,
sizeof
(
DWORD
),
NULL
);
res
=
IStream_Write
(
pStm
,
&
DEADFFFF
,
sizeof
(
DWORD
),
NULL
);
if
(
!
SUCCEED
ED
(
res
))
return
res
;
if
(
FAIL
ED
(
res
))
return
res
;
/* write 5 zero DWORDs */
/* write 5 zero DWORDs */
for
(
i
=
0
;
i
<
5
;
i
++
)
for
(
i
=
0
;
i
<
5
;
i
++
)
{
{
res
=
IStream_Write
(
pStm
,
&
ZERO
,
sizeof
(
DWORD
),
NULL
);
res
=
IStream_Write
(
pStm
,
&
ZERO
,
sizeof
(
DWORD
),
NULL
);
if
(
!
SUCCEED
ED
(
res
))
return
res
;
if
(
FAIL
ED
(
res
))
return
res
;
}
}
/* Write the wide version if:
/* Write the wide version if:
...
@@ -414,16 +414,16 @@ FileMonikerImpl_Save(IMoniker* iface, IStream* pStm, BOOL fClearDirty)
...
@@ -414,16 +414,16 @@ FileMonikerImpl_Save(IMoniker* iface, IStream* pStm, BOOL fClearDirty)
/* write bytes needed for the filepathW (without 0) + 6 */
/* write bytes needed for the filepathW (without 0) + 6 */
bytesW
=
len
*
sizeof
(
WCHAR
)
+
6
;
bytesW
=
len
*
sizeof
(
WCHAR
)
+
6
;
res
=
IStream_Write
(
pStm
,
&
bytesW
,
sizeof
(
DWORD
),
NULL
);
res
=
IStream_Write
(
pStm
,
&
bytesW
,
sizeof
(
DWORD
),
NULL
);
if
(
!
SUCCEED
ED
(
res
))
return
res
;
if
(
FAIL
ED
(
res
))
return
res
;
/* try again, without the extra 6 */
/* try again, without the extra 6 */
bytesW
-=
6
;
bytesW
-=
6
;
res
=
IStream_Write
(
pStm
,
&
bytesW
,
sizeof
(
DWORD
),
NULL
);
res
=
IStream_Write
(
pStm
,
&
bytesW
,
sizeof
(
DWORD
),
NULL
);
if
(
!
SUCCEED
ED
(
res
))
return
res
;
if
(
FAIL
ED
(
res
))
return
res
;
/* write a WORD 3 */
/* write a WORD 3 */
res
=
IStream_Write
(
pStm
,
&
THREE
,
sizeof
(
WORD
),
NULL
);
res
=
IStream_Write
(
pStm
,
&
THREE
,
sizeof
(
WORD
),
NULL
);
if
(
!
SUCCEED
ED
(
res
))
return
res
;
if
(
FAIL
ED
(
res
))
return
res
;
/* write W string (no 0) */
/* write W string (no 0) */
res
=
IStream_Write
(
pStm
,
filePathW
,
bytesW
,
NULL
);
res
=
IStream_Write
(
pStm
,
filePathW
,
bytesW
,
NULL
);
...
...
dlls/ole32/storage32.c
View file @
3ed8ffcc
...
@@ -1906,7 +1906,7 @@ static HRESULT WINAPI StorageImpl_Stat( IStorage* iface,
...
@@ -1906,7 +1906,7 @@ static HRESULT WINAPI StorageImpl_Stat( IStorage* iface,
StorageImpl
*
const
This
=
(
StorageImpl
*
)
iface
;
StorageImpl
*
const
This
=
(
StorageImpl
*
)
iface
;
HRESULT
result
=
StorageBaseImpl_Stat
(
iface
,
pstatstg
,
grfStatFlag
);
HRESULT
result
=
StorageBaseImpl_Stat
(
iface
,
pstatstg
,
grfStatFlag
);
if
(
!
FAIL
ED
(
result
)
&&
((
grfStatFlag
&
STATFLAG_NONAME
)
==
0
)
&&
This
->
pwcsName
)
if
(
SUCCEED
ED
(
result
)
&&
((
grfStatFlag
&
STATFLAG_NONAME
)
==
0
)
&&
This
->
pwcsName
)
{
{
CoTaskMemFree
(
pstatstg
->
pwcsName
);
CoTaskMemFree
(
pstatstg
->
pwcsName
);
pstatstg
->
pwcsName
=
CoTaskMemAlloc
((
lstrlenW
(
This
->
pwcsName
)
+
1
)
*
sizeof
(
WCHAR
));
pstatstg
->
pwcsName
=
CoTaskMemAlloc
((
lstrlenW
(
This
->
pwcsName
)
+
1
)
*
sizeof
(
WCHAR
));
...
@@ -6335,13 +6335,13 @@ HRESULT WINAPI OleLoadFromStream(IStream *pStm,REFIID iidInterface,void** ppvOb
...
@@ -6335,13 +6335,13 @@ HRESULT WINAPI OleLoadFromStream(IStream *pStm,REFIID iidInterface,void** ppvOb
TRACE
(
"(%p,%s,%p)
\n
"
,
pStm
,
debugstr_guid
(
iidInterface
),
ppvObj
);
TRACE
(
"(%p,%s,%p)
\n
"
,
pStm
,
debugstr_guid
(
iidInterface
),
ppvObj
);
res
=
ReadClassStm
(
pStm
,
&
clsid
);
res
=
ReadClassStm
(
pStm
,
&
clsid
);
if
(
!
SUCCEED
ED
(
res
))
if
(
FAIL
ED
(
res
))
return
res
;
return
res
;
res
=
CoCreateInstance
(
&
clsid
,
NULL
,
CLSCTX_INPROC_SERVER
,
iidInterface
,
ppvObj
);
res
=
CoCreateInstance
(
&
clsid
,
NULL
,
CLSCTX_INPROC_SERVER
,
iidInterface
,
ppvObj
);
if
(
!
SUCCEED
ED
(
res
))
if
(
FAIL
ED
(
res
))
return
res
;
return
res
;
res
=
IUnknown_QueryInterface
((
IUnknown
*
)
*
ppvObj
,
&
IID_IPersistStream
,(
LPVOID
*
)
&
xstm
);
res
=
IUnknown_QueryInterface
((
IUnknown
*
)
*
ppvObj
,
&
IID_IPersistStream
,(
LPVOID
*
)
&
xstm
);
if
(
!
SUCCEED
ED
(
res
))
{
if
(
FAIL
ED
(
res
))
{
IUnknown_Release
((
IUnknown
*
)
*
ppvObj
);
IUnknown_Release
((
IUnknown
*
)
*
ppvObj
);
return
res
;
return
res
;
}
}
...
...
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