Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

com::LWResult Class Reference

#include <defs.h>

List of all members.

Detailed Description

"Last worst" result type.

Variables of this class are used instead of HRESULT variables when it is desirable to memorize the "last worst" result code instead of the last assigned one. In other words, an assignment operation to a variable of this class will succeed only if the result code to assign has the same or worse severity. The following table demonstrate this (the first column lists the previous result code stored in the variable, the first row lists the new assigned, 'A' means the assignment will take place, '> S_OK' means a warning result code):

{{{ FAILED > S_OK S_OK FAILED A - - > S_OK A A - S_OK A A -


In practice, you will need to use a LWResult variable when you call some COM method B after COM method A fails and want to return the result code of B if B also fails, but still want to return the failed result code of A if B issues a warning or succeeds.

Definition at line 546 of file defs.h.

Public Member Functions

HRESULT * operator & ()
 operator HRESULT () const
LWResultoperator= (HRESULT aRC)

Private Attributes


The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index