Home > Back-end >  What's the difference between a nsresult and HRESULT
What's the difference between a nsresult and HRESULT

Time:10-18

Bored looking at the wrong processing recently, suddenly think of seeing nsresult before and HRESULT but didn't find out what is the difference between, today want to understand what's so different, I know that one is the inside of the COM is the inside of the XPCOM, what other?

CodePudding user response:

# define HRESULT nsresult

CodePudding user response:

Also see what the XPCOM is
http://blog.csdn.net/absurd/article/details/1524699
http://www.cnblogs.com/phinecos/archive/2008/04/25/1171614.html

CodePudding user response:

Continue to search
[url=http://www.cnblogs.com/fangyukuan/archive/2010/06/10/1755874.html] http://[/url]


//nsresult
The default data type, is a 32 bit integer.

//retrieves
# ifdef __midl
Typedef LONG HRESULT;
# the else
Typedef __success (return & gt;=0) long HRESULT;
# endif//__midl
# endif//! _HRESULT_DEFINED

CodePudding user response:

Basically all H type is HANDLE in the beginning, and the HANDLE is actually void *, and void * is actually long, namely a integer
  • Related