Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
767 B

  1. //
  2. // Defines the queue label and path
  3. //
  4. #define STR_QUEUE_NAME L".\\IStreamTest"
  5. #define STR_QUEUE_LABEL L"Object Test Queue"
  6. // COM exception handler
  7. void dump_com_error(_com_error &e)
  8. {
  9. _tprintf(_T("Oops - hit an error!\n"));
  10. _tprintf(_T("\a\tCode = %08lx\n"), e.Error());
  11. _tprintf(_T("\a\tCode meaning = %s\n"), e.ErrorMessage());
  12. _bstr_t bstrSource(e.Source());
  13. _bstr_t bstrDescription(e.Description());
  14. _tprintf(_T("\a\tSource = %s\n"), (LPCTSTR) bstrSource);
  15. _tprintf(_T("\a\tDescription = %s\n"), (LPCTSTR) bstrDescription);
  16. }
  17. struct InitOle {
  18. InitOle() { CoInitialize(NULL); } // Initialize Component Object Model(COM) library
  19. ~InitOle() { CoUninitialize(); } // Uninitialize Component Object Model(COM) library
  20. };