1
0
mirror of https://github.com/danog/libtgvoip.git synced 2024-12-02 17:51:06 +01:00
libtgvoip/os/windows/WindowsSandboxUtils.h

44 lines
1.1 KiB
C
Raw Normal View History

//
// libtgvoip is free and unencumbered public domain software.
// For more information, see http://unlicense.org or the UNLICENSE file
// you should have received with this source code distribution.
//
2018-09-09 22:20:48 +02:00
#ifndef TGVOIP_WINDOWSSANDBOXUTILS_H
#define TGVOIP_WINDOWSSANDBOXUTILS_H
#include <audioclient.h>
2017-05-11 05:21:04 +02:00
#include <windows.h>
#ifndef TGVOIP_WP_SILVERLIGHT
2017-05-11 05:21:04 +02:00
#include <mmdeviceapi.h>
#endif
2017-05-11 05:21:04 +02:00
#include <wrl.h>
#include <wrl/implements.h>
using namespace Microsoft::WRL;
namespace tgvoip {
2017-05-11 05:21:04 +02:00
#ifndef TGVOIP_WP_SILVERLIGHT
class ActivationHandler :
public RuntimeClass< RuntimeClassFlags< ClassicCom >, FtmBase, IActivateAudioInterfaceCompletionHandler >
{
public:
STDMETHOD(ActivateCompleted)(IActivateAudioInterfaceAsyncOperation *operation);
ActivationHandler(HANDLE _event);
HANDLE event;
IAudioClient2* client;
HRESULT actResult;
};
#endif
class WindowsSandboxUtils {
public:
static IAudioClient2* ActivateAudioDevice(const wchar_t* devID, HRESULT* callResult, HRESULT* actResult);
};
}
2018-09-09 22:20:48 +02:00
#endif //TGVOIP_WINDOWSSANDBOXUTILS_H