1 | //////////////////////////////////////////////////////////// |
---|
2 | // Copyright (C) Roman Ryltsov, 2008-2014 |
---|
3 | // Created by Roman Ryltsov roman@alax.info, http://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 |
---|
8 | // or otherwise (provided that you dont 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. It is allowed to distribute |
---|
12 | // DirectShowSpy if only it is not registered with Windows by default and either |
---|
13 | // used privately, or registered on specific throubleshooting request. The advice applies |
---|
14 | // to hooking methods used by DirectShowSpy in general as well. |
---|
15 | |
---|
16 | #include "stdafx.h" |
---|
17 | #include "resource.h" |
---|
18 | |
---|
19 | //////////////////////////////////////////////////////////// |
---|
20 | // DoGraphBuilderCallbackPropertySheetModal |
---|
21 | |
---|
22 | #include "GraphBuilderCallbackPropertySheet.h" |
---|
23 | |
---|
24 | #if defined(_WIN64) |
---|
25 | extern "C" __declspec(dllexport) |
---|
26 | #else |
---|
27 | #pragma comment(linker, "/EXPORT:DoGraphBuilderCallbackPropertySheetModal=_DoGraphBuilderCallbackPropertySheetModal@0,PRIVATE") |
---|
28 | extern "C" // __declspec(dllexport) |
---|
29 | #endif // defined(_WIN64) |
---|
30 | |
---|
31 | HRESULT STDMETHODCALLTYPE DoGraphBuilderCallbackPropertySheetModal() throw() |
---|
32 | { |
---|
33 | _ATLTRY |
---|
34 | { |
---|
35 | CSingleThreadedApartment SingleThreadedApartment; |
---|
36 | _W(AtlInitCommonControls(ICC_WIN95_CLASSES | ICC_COOL_CLASSES | ICC_STANDARD_CLASSES)); |
---|
37 | CGraphBuilderCallbackPropertySheet PropertySheet; |
---|
38 | PropertySheet.DoModal(GetActiveWindow()); |
---|
39 | } |
---|
40 | _ATLCATCH(Exception) |
---|
41 | { |
---|
42 | _C(Exception); |
---|
43 | } |
---|
44 | return S_OK; |
---|
45 | } |
---|
46 | |
---|
47 | //////////////////////////////////////////////////////////// |
---|
48 | // DoFilterGraphListPropertySheetModal |
---|
49 | |
---|
50 | #include "FilterGraphList.h" |
---|
51 | |
---|
52 | #if defined(_WIN64) |
---|
53 | extern "C" __declspec(dllexport) |
---|
54 | #else |
---|
55 | #pragma comment(linker, "/EXPORT:DoFilterGraphListPropertySheetModal=_DoFilterGraphListPropertySheetModal@0,PRIVATE") |
---|
56 | extern "C" // __declspec(dllexport) |
---|
57 | #endif // defined(_WIN64) |
---|
58 | |
---|
59 | HRESULT STDMETHODCALLTYPE DoFilterGraphListPropertySheetModal() throw() |
---|
60 | { |
---|
61 | _ATLTRY |
---|
62 | { |
---|
63 | CSingleThreadedApartment SingleThreadedApartment; |
---|
64 | _W(AtlInitCommonControls(ICC_WIN95_CLASSES | ICC_COOL_CLASSES | ICC_STANDARD_CLASSES)); |
---|
65 | CFilterGraphListPropertySheet PropertySheet; |
---|
66 | PropertySheet.DoModal(GetActiveWindow()); |
---|
67 | } |
---|
68 | _ATLCATCH(Exception) |
---|
69 | { |
---|
70 | _C(Exception); |
---|
71 | } |
---|
72 | return S_OK; |
---|
73 | } |
---|
74 | |
---|