| 6 |
| 7 | #ifndef LIBTGVOIP_WINDOWS_SANDBOX_UTILS |
| 8 | #define LIBTGVOIP_WINDOWS_SANDBOX_UTILS |
| 9 |
| 10 | #include <audioclient.h> |
| 11 | #include <windows.h> |
| 12 | #ifndef TGVOIP_WP_SILVERLIGHT |
| 13 | #include <mmdeviceapi.h> |
| 14 | #endif |
| 15 | #include <wrl.h> |
| 16 | #include <wrl/implements.h> |
| 17 |
| 18 | using namespace Microsoft::WRL; |
| 19 |
| 20 | namespace tgvoip |
| 21 | { |
| 22 |
| 23 | #ifndef TGVOIP_WP_SILVERLIGHT |
| 24 | class ActivationHandler : public RuntimeClass<RuntimeClassFlags<ClassicCom>, FtmBase, IActivateAudioInterfaceCompletionHandler> |
| 25 | { |
| 26 | public: |
| 27 | STDMETHOD(ActivateCompleted) |
| 28 | (IActivateAudioInterfaceAsyncOperation* operation); |
| 29 |
| 30 | ActivationHandler(HANDLE _event); |
| 31 | HANDLE event; |
| 32 | IAudioClient2* client; |
| 33 | HRESULT actResult; |
| 34 | }; |
| 35 | #endif |
| 36 |
| 37 | class WindowsSandboxUtils |
| 38 | { |
| 39 | public: |
| 40 | static IAudioClient2* ActivateAudioDevice(const wchar_t* devID, HRESULT* callResult, HRESULT* actResult); |
| 41 | }; |
| 42 | } |
| 43 |
| 44 | #endif // LIBTGVOIP_WINDOWS_SANDBOX_UTILS |
| 45 |