Click here to Skip to main content
15,886,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am devloping on win32 console application in which some comm componant are used.But for little test i check out the function GetErrorInfo before any impementation.I found that i will return me S_FALSE at all condtion. Following is my simple code not working..
#include "stdafx.h"

C++
#include  "Windows.h"
#include "atlsafe.h"
#include "atlconv.h"
#include "time.h"
#include "WinError.h"

int _tmain(int argc, _TCHAR* argv[])
{
    HRESULT hr44;
    CComPtr<IErrorInfo> pErrInfo; 
    hr44 = ::GetErrorInfo( 0, &pErrInfo );
    return 0;
}

is i am missing some thing..
Posted

1 solution

See GetErrorInfo[^] in the MSDN:
Quote:
Obtains the error information pointer set by the previous call to SetErrorInfo in the current logical thread.

If you got the return value
Quote:

S_FALSE There was no error object to return.
, no error info has been set by a COM function which is obvious because you did not have called any COM function.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900