mirror of https://github.com/tongzx/nt5src
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
24 lines
767 B
//
|
|
// Defines the queue label and path
|
|
//
|
|
#define STR_QUEUE_NAME L".\\IStreamTest"
|
|
#define STR_QUEUE_LABEL L"Object Test Queue"
|
|
|
|
// COM exception handler
|
|
void dump_com_error(_com_error &e)
|
|
{
|
|
_tprintf(_T("Oops - hit an error!\n"));
|
|
_tprintf(_T("\a\tCode = %08lx\n"), e.Error());
|
|
_tprintf(_T("\a\tCode meaning = %s\n"), e.ErrorMessage());
|
|
_bstr_t bstrSource(e.Source());
|
|
_bstr_t bstrDescription(e.Description());
|
|
_tprintf(_T("\a\tSource = %s\n"), (LPCTSTR) bstrSource);
|
|
_tprintf(_T("\a\tDescription = %s\n"), (LPCTSTR) bstrDescription);
|
|
}
|
|
|
|
|
|
struct InitOle {
|
|
InitOle() { CoInitialize(NULL); } // Initialize Component Object Model(COM) library
|
|
~InitOle() { CoUninitialize(); } // Uninitialize Component Object Model(COM) library
|
|
};
|
|
|