You might think so, but!
WORD: 16 bit unsigned integer
DWORD: 32 bit unsigned integer
Search for DWORD in the MSDN Library and you''ll find the definition. And a bunch of others too.
-Benny-
HRESULT questions
Argh.. Am I cursed today ?
Well M$ is wrong, the definition of a word is the size of a processor register. So unless windows is still 16bit, a word should be 32 bits...
OH, that's why they're using DWORDs everywhere ...
Edited by - Fruny on November 22, 2001 6:35:10 PM
Well M$ is wrong, the definition of a word is the size of a processor register. So unless windows is still 16bit, a word should be 32 bits...
OH, that's why they're using DWORDs everywhere ...
Edited by - Fruny on November 22, 2001 6:35:10 PM
quote:Original post by Fruny
Argh.. Am I cursed today ?
No. The second time around you were working based on the true definitions of a word and a doubleword, but realize that those definitions are platform specific. Since the Windows API has existed since the 286, those definitions were originally 16-bit based but have had to carry over to Win32 for backwards compatibility.
Anything you want to know about hresults are in msdn and winerror.h including the bitwise description of an hresult. basically they''re made of a facility code to tell where it came from, a severity bit to determine if its an error or not and if its an error how serious it is, and finally an error code.
If you want to make you''re own hresult use this
#define E_MYERROR MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 512 or greater)
use FACILITY_ITF because thats the facility set aside for user error codes. and values less than 512 are reserved.
to simplify
Less than 0 = Error
Greater than 0 = success
Any more questions....consult WinError.h
If you want to make you''re own hresult use this
#define E_MYERROR MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 512 or greater)
use FACILITY_ITF because thats the facility set aside for user error codes. and values less than 512 are reserved.
to simplify
Less than 0 = Error
Greater than 0 = success
Any more questions....consult WinError.h
alright i understand now, and ill change my source names thanks to everyone who answered, it cleared things up a lot!
quote:Original post by Grugnorr
Just talking from memory( and not DDR ), isn´t an HRESULT a dword? . I don´t think it is a pointer type...
.-LAROCHE: They are costants used to enumerate errors(or absent of errors)
What the hells!
Actually, you''re right, HRESULT is typedef''d to a dword.
"And that''s the bottom line cause I said so!"
Cyberdrek
Headhunter Soft
A division of DLC Multimedia
Resist Windows XP''s Invasive Production Activation Technology!
"gitty up" -- Kramer
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement