COM errors
-
i am using third party COM component... I have put them in try catch block for any com error.. by using _com_error i am able to retrive the error code and error message... But i want to filter out some of the error code say 0x80004005 (unexpected error). When this error occurs i just handle the error gracefully without notifying the user of the actual cause. My question is.. Is there any #define for 0x80004005 like #define COM_UNEXPECTED 0x80004005 so that i can use it in my switch case like switch(ce.Error()) { case COM_UNEXPECTED: .... default: ... } now my switch looks like this switch(ce.Error()) { case 0x80004005: .... default: ... } I know that i can #define it myself but i looking for the one that is already defined. Thank You. My God is more powerfull Than Your God. (the line that divides the world)
-
i am using third party COM component... I have put them in try catch block for any com error.. by using _com_error i am able to retrive the error code and error message... But i want to filter out some of the error code say 0x80004005 (unexpected error). When this error occurs i just handle the error gracefully without notifying the user of the actual cause. My question is.. Is there any #define for 0x80004005 like #define COM_UNEXPECTED 0x80004005 so that i can use it in my switch case like switch(ce.Error()) { case COM_UNEXPECTED: .... default: ... } now my switch looks like this switch(ce.Error()) { case 0x80004005: .... default: ... } I know that i can #define it myself but i looking for the one that is already defined. Thank You. My God is more powerfull Than Your God. (the line that divides the world)
Hi Mr Prakash! actually yes, u dont need to make one more #define as one already exist there /**** MessageId: E_FAIL MessageText: Unspecified error #define E_FAIL _HRESULT_TYPEDEF_(0x80004005L) ***/ so instead of using that not so gud luking figure 0x80004005 u can smiply use better luking "E_FAIL" for this purpose :) I hope ur prob is solved :) Abhishek Srivastava Software Engineer (VC++) India ,Noida Mobile no 9891492921 :)
-
Hi Mr Prakash! actually yes, u dont need to make one more #define as one already exist there /**** MessageId: E_FAIL MessageText: Unspecified error #define E_FAIL _HRESULT_TYPEDEF_(0x80004005L) ***/ so instead of using that not so gud luking figure 0x80004005 u can smiply use better luking "E_FAIL" for this purpose :) I hope ur prob is solved :) Abhishek Srivastava Software Engineer (VC++) India ,Noida Mobile no 9891492921 :)
Yeah you solved my prob, thanx a lot. My God is more powerfull Than Your God. (the line that divides the world)