source: trunk/DirectShowSpy/FilterGraphSpy.cpp @ 267

Last change on this file since 267 was 267, checked in by roman, 10 years ago

Updated source code/copyright notice

  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1////////////////////////////////////////////////////////////
2// Copyright (C) Roman Ryltsov, 2008-2014
3// Created by Roman Ryltsov roman@alax.info
4//
5// This source code is published to complement DirectShowSpy developer powertoy
6// and demonstrate the internal use of APIs and tricks powering the tool. It is
7// allowed to freely re-use the portions of the code in other projects, commercial or otherwise
8// (provided that you don’t pretend that you wrote the original tool).
9//
10// Please keep in mind that DirectShowSpy is a developer tool, it is strongly recommended
11// that it is not shipped with release grade software. The advise applies to hooking methods
12// used by DirectShowSpy in general as well.
13
14#include "stdafx.h"
15#include "resource.h"
16
17////////////////////////////////////////////////////////////
18// DoGraphBuilderCallbackPropertySheetModal
19
20#include "GraphBuilderCallbackPropertySheet.h"
21
22#if defined(_WIN64)
23        extern "C" __declspec(dllexport) 
24#else
25        #pragma comment(linker, "/EXPORT:DoGraphBuilderCallbackPropertySheetModal=_DoGraphBuilderCallbackPropertySheetModal@0,PRIVATE")
26        extern "C" // __declspec(dllexport)
27#endif // defined(_WIN64)
28
29HRESULT STDMETHODCALLTYPE DoGraphBuilderCallbackPropertySheetModal() throw()
30{
31        _ATLTRY
32        {
33                CSingleThreadedApartment SingleThreadedApartment;
34                _W(AtlInitCommonControls(ICC_WIN95_CLASSES | ICC_COOL_CLASSES | ICC_STANDARD_CLASSES));
35                CGraphBuilderCallbackPropertySheet PropertySheet;
36                PropertySheet.DoModal(GetActiveWindow());
37        }
38        _ATLCATCH(Exception)
39        {
40                _C(Exception);
41        }
42        return S_OK;
43}
44
45////////////////////////////////////////////////////////////
46// DoFilterGraphListPropertySheetModal
47
48#include "FilterGraphList.h"
49
50#if defined(_WIN64)
51        extern "C" __declspec(dllexport) 
52#else
53        #pragma comment(linker, "/EXPORT:DoFilterGraphListPropertySheetModal=_DoFilterGraphListPropertySheetModal@0,PRIVATE")
54        extern "C" // __declspec(dllexport)
55#endif // defined(_WIN64)
56
57HRESULT STDMETHODCALLTYPE DoFilterGraphListPropertySheetModal() throw()
58{
59        _ATLTRY
60        {
61                CSingleThreadedApartment SingleThreadedApartment;
62                _W(AtlInitCommonControls(ICC_WIN95_CLASSES | ICC_COOL_CLASSES | ICC_STANDARD_CLASSES));
63                CFilterGraphListPropertySheet PropertySheet;
64                PropertySheet.DoModal(GetActiveWindow());
65        }
66        _ATLCATCH(Exception)
67        {
68                _C(Exception);
69        }
70        return S_OK;
71}
72
Note: See TracBrowser for help on using the repository browser.