1
0
mirror of https://github.com/danog/libtgvoip.git synced 2024-12-11 16:49:52 +01:00
libtgvoip/os/windows/WindowsSandboxUtils.h
Grishka cd8d78b366 Added TCP fallback
Support for Windows Phone Silverlight
Various fixes
2017-06-06 04:44:16 +03:00

39 lines
973 B
C++

//
// 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.
//
#include <audioclient.h>
#include <windows.h>
#ifndef TGVOIP_WP_SILVERLIGHT
#include <mmdeviceapi.h>
#endif
#include <wrl.h>
#include <wrl/implements.h>
using namespace Microsoft::WRL;
namespace tgvoip {
#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);
};
}