p += _stprintf(TEXT("%s"), e.ErrorMessage());
p += _stprintf(p, TEXT("%s"), e.ErrorMessage());
void HandleException(COMException& e, HWND hwnd){	TCHAR msg[4*BUFFER_LEN];	LPTSTR p = msg;	p += _stprintf(TEXT("%s"), e.ErrorMessage());	if (e._ctx)		p += _stprintf(p, TEXT("\nContext: %s"), e._ctx);	if (!e._obj.empty())		p += _stprintf(p, TEXT("\nObject: %s"), (LPCTSTR)e._obj);	if (e._file)#ifdef UNICODE		p += _stprintf(p, TEXT("\nLocation: %hs(%d)"), e._file, e._line);#else		p += _stprintf(p, TEXT("\nLocation: %s(%d)"), e._file, e._line);#endif	SetLastError(0);	MessageBox(hwnd, msg, TEXT("ShellClasses COM Exception"), MB_ICONHAND|MB_OK);	 // If displaying the error message box _with_ parent was not successfull, display it now without a parent window.	if (GetLastError() == ERROR_INVALID_WINDOW_HANDLE)		MessageBox(0, msg, TEXT("ShellClasses COM Exception"), MB_ICONHAND|MB_OK);}