在很多例子上面看见
LRESLUT的应用,他的实际含义是什么?用法是怎么样声明的?

解决方案 »

  1.   

    在COM编程中常用的返回值类型,实际上是long型,按位设定了错误代码信息。可以用SUCCEEDED宏和FAILED宏做简单判断返回值成功或者失败。以下摘自MSDN:The HRESULT data type is a 32-bit value that is used to describe an error or warning.Syntax
    typedef LONG     HRESULT; 
    Res
    The HRESULT data type is the same as the SCODE data type. An HRESULT value is made up of the following fields: A 1-bit code indicating severity, where zero represents success and 1 represents failure. 
    A 4-bit reserved value. 
    An 11-bit code indicating responsibility for the error or warning, also known as a facility code. 
    A 16-bit code describing the error or warning. 
    Most MAPI interface methods and functions return HRESULT values to provide detailed result information. HRESULT values are also used widely in COM interface methods. COM provides several macros for converting between HRESULT values and SCODE values, another common data type for error handling. 
      

  2.   

    LRESLUT的应用一般用于哪些方面呢?
      

  3.   

    就是一个宏,你goto definition