result意思 C++C++中result和HRESULT都什么东西啊,怎么用?请简单明了一点,
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 19:38:42
result意思 C++C++中result和HRESULT都什么东西啊,怎么用?请简单明了一点,
result意思 C++
C++中result和HRESULT都什么东西啊,怎么用?请简单明了一点,
result意思 C++C++中result和HRESULT都什么东西啊,怎么用?请简单明了一点,
result就是一个单词吧,就是自己写程序定义的变量或者函数名称,说白了就是自己写的.
HRESULT其实你可以查看msdn的,H开头,一般是一个句柄啦,你可以理解为一个数据类型(就想int一样的东西),我帮你看了一下msdn,下面就是msdn的解释:
(1)com平台
HRESULT
An opaque result handle defined to be zero for a successful return from a function and nonzero if error or status information is returned. To convert an HRESULT into the more detailed SCODE, applications call GetScode(). See also SCODE.
(2)Platform SDK: Automation
H
HRESULT
A value returned from a function call to an interface, consisting of a severity code, context information, a facility code, and a status code that describes the result. For 16-bit Windows systems, the HRESULT is an opaque result handle defined to be zero for a successful return from a function, and nonzero if error or status information is to be returned. To convert an HRESULT into a more detailed SCODE (or return value), applications call GetSCode(). See SCODE.
(3)Platform SDK: MAPI
HRESULT
The HRESULT data type is a 32-bit value that is used to describe an error or warning.
typedef LONG HRESULT;
第三个最好理解了吧,typedef,嘿嘿,就是long的意思啦,前面两个其实也差不多吧,都是句柄.
其实你理解为数据类型应该就ok了,当然我也没见过这个,但其实都是一样的,msdn上都会有说明的.