Sunshine v2025.118.151840
Self-hosted game stream host for Moonlight.
PolicyConfig.h
Go to the documentation of this file.
1
9#pragma once
10
11#include <mmdeviceapi.h>
12
13#ifdef __MINGW32__
14 #undef DEFINE_GUID
15 #ifdef __cplusplus
16 #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) EXTERN_C const GUID DECLSPEC_SELECTANY name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
17 #else
18 #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) const GUID DECLSPEC_SELECTANY name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
19 #endif
20
21DEFINE_GUID(IID_IPolicyConfig, 0xf8679f50, 0x850a, 0x41cf, 0x9c, 0x72, 0x43, 0x0f, 0x29, 0x02, 0x90, 0xc8);
22DEFINE_GUID(CLSID_CPolicyConfigClient, 0x870af99c, 0x171d, 0x4f9e, 0xaf, 0x0d, 0xe6, 0x3d, 0xf4, 0x0c, 0x2b, 0xc9);
23
24#endif
25
26interface DECLSPEC_UUID("f8679f50-850a-41cf-9c72-430f290290c8") IPolicyConfig;
27class DECLSPEC_UUID("870af99c-171d-4f9e-af0d-e63df40c2bc9") CPolicyConfigClient;
28// ----------------------------------------------------------------------------
29// class CPolicyConfigClient
30// {870af99c-171d-4f9e-af0d-e63df40c2bc9}
31//
32// interface IPolicyConfig
33// {f8679f50-850a-41cf-9c72-430f290290c8}
34//
35// Query interface:
36// CComPtr<IPolicyConfig> PolicyConfig;
37// PolicyConfig.CoCreateInstance(__uuidof(CPolicyConfigClient));
38//
39// @compatible: Windows 7 and Later
40// ----------------------------------------------------------------------------
41interface IPolicyConfig: public IUnknown {
42public:
43 virtual HRESULT
44 GetMixFormat(
45 PCWSTR,
46 WAVEFORMATEX **);
47
48 virtual HRESULT STDMETHODCALLTYPE
49 GetDeviceFormat(
50 PCWSTR,
51 INT,
52 WAVEFORMATEX **);
53
54 virtual HRESULT STDMETHODCALLTYPE ResetDeviceFormat(
55 PCWSTR);
56
57 virtual HRESULT STDMETHODCALLTYPE
58 SetDeviceFormat(
59 PCWSTR,
60 WAVEFORMATEX *,
61 WAVEFORMATEX *);
62
63 virtual HRESULT STDMETHODCALLTYPE GetProcessingPeriod(
64 PCWSTR,
65 INT,
66 PINT64,
67 PINT64);
68
69 virtual HRESULT STDMETHODCALLTYPE SetProcessingPeriod(
70 PCWSTR,
71 PINT64);
72
73 virtual HRESULT STDMETHODCALLTYPE
74 GetShareMode(
75 PCWSTR,
76 struct DeviceShareMode *);
77
78 virtual HRESULT STDMETHODCALLTYPE
79 SetShareMode(
80 PCWSTR,
81 struct DeviceShareMode *);
82
83 virtual HRESULT STDMETHODCALLTYPE
84 GetPropertyValue(
85 PCWSTR,
86 const PROPERTYKEY &,
87 PROPVARIANT *);
88
89 virtual HRESULT STDMETHODCALLTYPE
90 SetPropertyValue(
91 PCWSTR,
92 const PROPERTYKEY &,
93 PROPVARIANT *);
94
95 virtual HRESULT STDMETHODCALLTYPE
96 SetDefaultEndpoint(
97 PCWSTR wszDeviceId,
98 ERole eRole);
99
100 virtual HRESULT STDMETHODCALLTYPE SetEndpointVisibility(
101 PCWSTR,
102 INT);
103};