In my continuing quest to get the IFilter interface working, I've now hit some error 
conditions. I haven't done a lot of C++ COM work, so I'm a little unsure about how to 
handle hresults. In Filterr.h there is some text on how to interpret hresults.

//  Values are 32 bit values layed out as follows:

//

//   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1

//   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0

//  +---+-+-+-----------------------+-------------------------------+

//  |Sev|C|R|     Facility          |               Code            |

//  +---+-+-+-----------------------+-------------------------------+

//

//  where

//

//      Sev - is the severity code

//

//          00 - Success

//          01 - Informational

//          10 - Warning

//          11 - Error

 

What I'm confused about is the order of the bits. I am getting a hresult of 
-2147467259, which is a bit pattern of 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 
0 0 0 0 0 1 0 1. From the header comments above, it looks like the severity is 10 
(warning). Is it written with the most significant bit first? Or the other way around?

Also, there are a number of defines for non error conditions, such as
 
#define NOT_AN_ERROR                     ((HRESULT)0x00080000L)



if I am doing a comparision with an hresult, do I need to do anything to the hresult 
to be able to OR these definiations and my hresult?



Thanks,
Erick

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to