source: trunk/Utilities/MediaFoundation/VideoProcessor01/Application.cpp @ 937

Last change on this file since 937 was 651, checked in by roman, 6 years ago
File size: 945 bytes
Line 
1////////////////////////////////////////////////////////////
2// Copyright (C) Roman Ryltsov, 2016
3// Created by Roman Ryltsov roman@alax.info
4//
5// A permission to use the source code is granted as long as reference to
6// source website http://alax.info is retained.
7
8#include "stdafx.h"
9#include "resource.h"
10#include "Module.h"
11
12int _tmain(int argc, _TCHAR* argv[])
13{
14        CModule Module;
15        _ATLTRY
16        {
17                Module.WinMain(SW_SHOWNORMAL);
18        }
19        _ATLCATCH(Exception)
20        {
21                _Z_ATLEXCEPTION(Exception);
22                CString sMessage = AtlFormatSystemMessage(Exception);
23                if(sMessage.IsEmpty())
24                        sMessage = AtlFormatString(_T("Error 0x%08X"), (HRESULT) Exception);
25                sMessage.TrimRight(_T("\t\n\r ."));
26                _tprintf(_T("Fatal Error: %s\n"), (LPCTSTR) sMessage);
27                _A((HRESULT) Exception != S_OK);
28                return (HRESULT) Exception;
29        }
30        _ATLCATCHALL()
31        {
32                _Z_EXCEPTION();
33                _tprintf(_T("Fatal Error\n"));
34                return -1;
35        }
36        return 0;
37}
38
Note: See TracBrowser for help on using the repository browser.