Отладка приложений


         

CoCreatelnstanceEx failed:


(LPTSTR) SlpMsgBuf, 

0,

NULL ) ;

printf ( " CoCreatelnstanceEx failed: Ox%08X\n" , hr ) ;

 printf ( "FormatMessage returned: %s\n" , IpMsgBuf ) ;

 return ; 

}

 hr = lpUnknown->Query!nterface ( IID_ITrace ,

(LPVOID*)&lpTrace ) ; 

lpUnknown->Release ( ) ;

 if ( FAILED ( hr } )

 {

LPVOID IpMsgBuf;

FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER |

 FORMAT_MESSAGE_FROM_SYSTEM |

  FORMAT_MESSAGE_IGNORE_INSERTS, NULL,

hr,

MAKELANGID ( LANG_NEUTRAL, SUBLANG_DEFAULT ),

 (LPTSTR) SlpMsgBuf, 0,

NULL );

printf ( "Querylnterface failed: Ox%08X\n" , hr ) ; 

printf { "FormatMessage returned: %s\n" , IpMsgBuf ) ;

 return ; 

}

OLECHAR * pszTemp ;

pszTemp = SysAllocString ( OLESTR ( "Hello from a C++ program!!!" ) ); ,

 lpTrace->Trace ( pszTemp ) ; 

SysFreeString ( pszTemp ) ;

 lpTrace->Release ( ) ;

 CoUninitialize ( ) ; 

}



Содержание  Назад  Вперед