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
c85b74d6
Commit
c85b74d6
authored
May 27, 2007
by
Francois Gouget
Committed by
Alexandre Julliard
May 29, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In the PSDK HRESULT_FROM_WIN32() is now an inline function, and it is…
In the PSDK HRESULT_FROM_WIN32() is now an inline function, and it is __HRESULT_FROM_WIN32() which is a macro.
parent
47b6392b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
misc.c
dlls/urlmon/tests/misc.c
+2
-2
winerror.h
include/winerror.h
+13
-1
winnt.h
include/winnt.h
+4
-1
No files found.
dlls/urlmon/tests/misc.c
View file @
c85b74d6
...
...
@@ -373,9 +373,9 @@ static const struct {
{
url2
,
mimeTextHtml
,
S_OK
},
{
url3
,
mimeTextHtml
,
S_OK
},
{
url4
,
NULL
,
E_FAIL
},
{
url5
,
NULL
,
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
)},
{
url5
,
NULL
,
__
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
)},
{
url6
,
NULL
,
E_FAIL
},
{
url7
,
NULL
,
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
)}
{
url7
,
NULL
,
__
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
)}
};
static
BYTE
data1
[]
=
"test data
\n
"
;
...
...
include/winerror.h
View file @
c85b74d6
...
...
@@ -81,8 +81,20 @@
#define HRESULT_SEVERITY(hr) (((hr) >> 31) & 0x1)
#define SCODE_SEVERITY(sc) (((sc) >> 31) & 0x1)
#define __HRESULT_FROM_WIN32(x) ((x) ? ((HRESULT) (((x) & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000)) : 0 )
#ifndef _HRESULT_DEFINED
#define _HRESULT_DEFINED
# ifdef _MSC_VER
typedef
long
HRESULT
;
# else
typedef
int
HRESULT
;
# endif
#endif
static
inline
HRESULT
HRESULT_FROM_WIN32
(
unsigned
long
x
)
{
return
x
?
((
HRESULT
)
((
x
&
0x0000FFFF
)
|
(
FACILITY_WIN32
<<
16
)
|
0x80000000
))
:
0
;
}
#define FACILITY_NT_BIT 0x10000000
#define HRESULT_FROM_WIN32(x) ((x) ? ((HRESULT) (((x) & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000)) : 0 )
#define HRESULT_FROM_NT(x) ((HRESULT) ((x) | FACILITY_NT_BIT))
/* SCODE <-> HRESULT functions */
...
...
include/winnt.h
View file @
c85b74d6
...
...
@@ -398,10 +398,13 @@ typedef LPCSTR PCTSTR, LPCTSTR;
/* Misc common WIN32 types */
typedef
char
CCHAR
;
typedef
LONG
HRESULT
;
typedef
DWORD
LCID
,
*
PLCID
;
typedef
WORD
LANGID
;
typedef
DWORD
EXECUTION_STATE
;
#ifndef _HRESULT_DEFINED
#define _HRESULT_DEFINED
typedef
LONG
HRESULT
;
#endif
/* Handle type */
...
...
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