[Bug 20005] New: MAKE_HRESULT macro is defined wrong..
wine-bugs at winehq.org
wine-bugs at winehq.org
Thu Sep 10 13:53:21 CDT 2009
http://bugs.winehq.org/show_bug.cgi?id=20005
Summary: MAKE_HRESULT macro is defined wrong..
Product: Wine
Version: 1.1.29
Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: directx-d3d
AssignedTo: wine-bugs at winehq.org
ReportedBy: celticht32 at aol.com
#define MAKE_HRESULT(sev,fac,code) \
((HRESULT) (((unsigned int)(sev)<<31) | ((unsigned int)(fac)<<16) |
((unsigned int)(code))) )
which is defined in include/winerror.h
should be the following :
#define MAKE_HRESULT(sev,fac,code) \
((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) |
((unsigned long)(code))) )
so for the following call make_hresult(1,_facwined3d,2152)
I believe the first macro translates it to :
1 | 43B | 434
not
1 | 876 | 868
according to MSDN site :
http://msdn.microsoft.com/en-us/library/ms694497(VS.85).aspx
and the C spec states the following:
The C++ spec states summit like an unsigned long must be at least 32-bits and
an unsigned int must be at least 16-bits.
So I think we are dropping 16 bits when this is being used which might explain
some of the test failures on some of the machines...
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the wine-bugs
mailing list