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
f26b1f03
Commit
f26b1f03
authored
Aug 17, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
combase: Move SetErrorInfo().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ed092274
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
80 deletions
+28
-80
combase.spec
dlls/combase/combase.spec
+1
-1
errorinfo.c
dlls/combase/errorinfo.c
+26
-0
Makefile.in
dlls/ole32/Makefile.in
+0
-1
errorinfo.c
dlls/ole32/errorinfo.c
+0
-77
ole32.spec
dlls/ole32/ole32.spec
+1
-1
No files found.
dlls/combase/combase.spec
View file @
f26b1f03
...
...
@@ -317,7 +317,7 @@
@ stdcall RoUninitialize()
@ stub RoUnregisterForApartmentShutdown
@ stub SetCleanupFlag
@ stdcall SetErrorInfo(long ptr)
ole32.SetErrorInfo
@ stdcall SetErrorInfo(long ptr)
@ stub SetRestrictedErrorInfo
@ stdcall StringFromCLSID(ptr ptr)
@ stdcall StringFromGUID2(ptr ptr long)
...
...
dlls/combase/errorinfo.c
View file @
f26b1f03
...
...
@@ -384,3 +384,29 @@ HRESULT WINAPI GetErrorInfo(ULONG reserved, IErrorInfo **error_info)
return
S_OK
;
}
/***********************************************************************
* SetErrorInfo (combase.@)
*/
HRESULT
WINAPI
SetErrorInfo
(
ULONG
reserved
,
IErrorInfo
*
error_info
)
{
struct
tlsdata
*
tlsdata
;
HRESULT
hr
;
TRACE
(
"%u, %p
\n
"
,
reserved
,
error_info
);
if
(
reserved
)
return
E_INVALIDARG
;
if
(
FAILED
(
hr
=
com_get_tlsdata
(
&
tlsdata
)))
return
hr
;
if
(
tlsdata
->
errorinfo
)
IErrorInfo_Release
(
tlsdata
->
errorinfo
);
tlsdata
->
errorinfo
=
error_info
;
if
(
error_info
)
IErrorInfo_AddRef
(
error_info
);
return
S_OK
;
}
dlls/ole32/Makefile.in
View file @
f26b1f03
...
...
@@ -17,7 +17,6 @@ C_SRCS = \
datacache.c
\
defaulthandler.c
\
dictionary.c
\
errorinfo.c
\
filelockbytes.c
\
filemoniker.c
\
ftmarshal.c
\
...
...
dlls/ole32/errorinfo.c
deleted
100644 → 0
View file @
ed092274
/*
* ErrorInfo API
*
* Copyright 2000 Patrik Stridvall, Juergen Schmied
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
* NOTES:
*
* The errorinfo is a per-thread object. The reference is stored in the
* TEB at offset 0xf80.
*/
#include <stdarg.h>
#include <string.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "oleauto.h"
#include "winerror.h"
#include "compobj_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
/***********************************************************************
* SetErrorInfo (OLE32.@)
*
* Sets the error information object for the current thread.
*
* PARAMS
* dwReserved [I] Reserved. Must be zero.
* perrinfo [I] Error info object.
*
* RETURNS
* Success: S_OK.
* Failure: E_INVALIDARG if dwReserved is not zero.
*/
HRESULT
WINAPI
SetErrorInfo
(
ULONG
dwReserved
,
IErrorInfo
*
perrinfo
)
{
IErrorInfo
*
pei
;
TRACE
(
"(%d, %p)
\n
"
,
dwReserved
,
perrinfo
);
if
(
dwReserved
)
{
ERR
(
"dwReserved (0x%x) != 0
\n
"
,
dwReserved
);
return
E_INVALIDARG
;
}
/* release old errorinfo */
pei
=
COM_CurrentInfo
()
->
errorinfo
;
if
(
pei
)
IErrorInfo_Release
(
pei
);
/* set to new value */
COM_CurrentInfo
()
->
errorinfo
=
perrinfo
;
if
(
perrinfo
)
IErrorInfo_AddRef
(
perrinfo
);
return
S_OK
;
}
dlls/ole32/ole32.spec
View file @
f26b1f03
...
...
@@ -262,7 +262,7 @@
@ stdcall STGMEDIUM_UserUnmarshal(ptr ptr ptr)
@ stdcall SetConvertStg(ptr long)
@ stub SetDocumentBitStg
@ stdcall SetErrorInfo(long ptr)
@ stdcall SetErrorInfo(long ptr)
combase.SetErrorInfo
@ stdcall StgConvertPropertyToVariant(ptr long ptr ptr)
@ stdcall StgConvertVariantToProperty(ptr long ptr ptr long long ptr)
@ stdcall StgCreateDocfile(wstr long long ptr)
...
...
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