HRESULT CreateErrorInfo(ICreateErrorInfo **pICreateErrorInfo);
Le résultat est rangé dans pICreateErreurInfo.
#include <windows.h>
#include <winbase.h>
#include <ole2.h>
ICreateErreurInfo *pICreateErrorInfo;
IErreurInfo *pIErrorInfo;
...
pICreateErrorInfo=NULL;
if ((CreateErreurInfo(&pICreateErrorInfo)!=S_OK) || !pICreateErrorInfo)
{
...
}
...
pIErrorInfo=NULL;
if ((pICreateErreurInfo->QueryInterface(IID_IErrorInfo, (void **)&pIErrorInfo)!=S_OK) || !pIErrorInfo)
{
...
}
...
if (SetErrorInfo(0, pIErrorInfo)!=S_OK)
{
...
}
...