// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Networking_Sockets_H #define WINRT_Windows_Networking_Sockets_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #include "winrt/Windows.Networking.h" #include "winrt/impl/Windows.ApplicationModel.Background.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Networking.2.h" #include "winrt/impl/Windows.Networking.Connectivity.2.h" #include "winrt/impl/Windows.Security.Credentials.2.h" #include "winrt/impl/Windows.Security.Cryptography.Certificates.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.Web.2.h" #include "winrt/impl/Windows.Networking.Sockets.2.h" namespace winrt::impl { template auto consume_Windows_Networking_Sockets_IControlChannelTrigger::ControlChannelTriggerId() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTrigger)->get_ControlChannelTriggerId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IControlChannelTrigger::ServerKeepAliveIntervalInMinutes() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTrigger)->get_ServerKeepAliveIntervalInMinutes(&value)); return value; } template auto consume_Windows_Networking_Sockets_IControlChannelTrigger::ServerKeepAliveIntervalInMinutes(uint32_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTrigger)->put_ServerKeepAliveIntervalInMinutes(value)); } template auto consume_Windows_Networking_Sockets_IControlChannelTrigger::CurrentKeepAliveIntervalInMinutes() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTrigger)->get_CurrentKeepAliveIntervalInMinutes(&value)); return value; } template auto consume_Windows_Networking_Sockets_IControlChannelTrigger::TransportObject() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTrigger)->get_TransportObject(&value)); return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IControlChannelTrigger::KeepAliveTrigger() const { void* trigger{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTrigger)->get_KeepAliveTrigger(&trigger)); return winrt::Windows::ApplicationModel::Background::IBackgroundTrigger{ trigger, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IControlChannelTrigger::PushNotificationTrigger() const { void* trigger{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTrigger)->get_PushNotificationTrigger(&trigger)); return winrt::Windows::ApplicationModel::Background::IBackgroundTrigger{ trigger, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IControlChannelTrigger::UsingTransport(winrt::Windows::Foundation::IInspectable const& transport) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTrigger)->UsingTransport(*(void**)(&transport))); } template auto consume_Windows_Networking_Sockets_IControlChannelTrigger::WaitForPushEnabled() const { winrt::Windows::Networking::Sockets::ControlChannelTriggerStatus channelTriggerStatus{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTrigger)->WaitForPushEnabled(reinterpret_cast(&channelTriggerStatus))); return channelTriggerStatus; } template auto consume_Windows_Networking_Sockets_IControlChannelTrigger::DecreaseNetworkKeepAliveInterval() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTrigger)->DecreaseNetworkKeepAliveInterval()); } template auto consume_Windows_Networking_Sockets_IControlChannelTrigger::FlushTransport() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTrigger)->FlushTransport()); } template auto consume_Windows_Networking_Sockets_IControlChannelTrigger2::IsWakeFromLowPowerSupported() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTrigger2)->get_IsWakeFromLowPowerSupported(&value)); return value; } template auto consume_Windows_Networking_Sockets_IControlChannelTriggerEventDetails::ControlChannelTrigger() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTriggerEventDetails)->get_ControlChannelTrigger(&value)); return winrt::Windows::Networking::Sockets::ControlChannelTrigger{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IControlChannelTriggerFactory::CreateControlChannelTrigger(param::hstring const& channelId, uint32_t serverKeepAliveIntervalInMinutes) const { void* notificationChannel{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTriggerFactory)->CreateControlChannelTrigger(*(void**)(&channelId), serverKeepAliveIntervalInMinutes, ¬ificationChannel)); return winrt::Windows::Networking::Sockets::ControlChannelTrigger{ notificationChannel, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IControlChannelTriggerFactory::CreateControlChannelTriggerEx(param::hstring const& channelId, uint32_t serverKeepAliveIntervalInMinutes, winrt::Windows::Networking::Sockets::ControlChannelTriggerResourceType const& resourceRequestType) const { void* notificationChannel{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTriggerFactory)->CreateControlChannelTriggerEx(*(void**)(&channelId), serverKeepAliveIntervalInMinutes, static_cast(resourceRequestType), ¬ificationChannel)); return winrt::Windows::Networking::Sockets::ControlChannelTrigger{ notificationChannel, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IControlChannelTriggerResetEventDetails::ResetReason() const { winrt::Windows::Networking::Sockets::ControlChannelTriggerResetReason value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTriggerResetEventDetails)->get_ResetReason(reinterpret_cast(&value))); return value; } template auto consume_Windows_Networking_Sockets_IControlChannelTriggerResetEventDetails::HardwareSlotReset() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTriggerResetEventDetails)->get_HardwareSlotReset(&value)); return value; } template auto consume_Windows_Networking_Sockets_IControlChannelTriggerResetEventDetails::SoftwareSlotReset() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IControlChannelTriggerResetEventDetails)->get_SoftwareSlotReset(&value)); return value; } template auto consume_Windows_Networking_Sockets_IDatagramSocket::Control() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket)->get_Control(&value)); return winrt::Windows::Networking::Sockets::DatagramSocketControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocket::Information() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket)->get_Information(&value)); return winrt::Windows::Networking::Sockets::DatagramSocketInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocket::OutputStream() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket)->get_OutputStream(&value)); return winrt::Windows::Storage::Streams::IOutputStream{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocket::ConnectAsync(winrt::Windows::Networking::HostName const& remoteHostName, param::hstring const& remoteServiceName) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket)->ConnectAsync(*(void**)(&remoteHostName), *(void**)(&remoteServiceName), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocket::ConnectAsync(winrt::Windows::Networking::EndpointPair const& endpointPair) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket)->ConnectWithEndpointPairAsync(*(void**)(&endpointPair), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocket::BindServiceNameAsync(param::hstring const& localServiceName) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket)->BindServiceNameAsync(*(void**)(&localServiceName), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocket::BindEndpointAsync(winrt::Windows::Networking::HostName const& localHostName, param::hstring const& localServiceName) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket)->BindEndpointAsync(*(void**)(&localHostName), *(void**)(&localServiceName), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocket::JoinMulticastGroup(winrt::Windows::Networking::HostName const& host) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket)->JoinMulticastGroup(*(void**)(&host))); } template auto consume_Windows_Networking_Sockets_IDatagramSocket::GetOutputStreamAsync(winrt::Windows::Networking::HostName const& remoteHostName, param::hstring const& remoteServiceName) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket)->GetOutputStreamAsync(*(void**)(&remoteHostName), *(void**)(&remoteServiceName), &value)); return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocket::GetOutputStreamAsync(winrt::Windows::Networking::EndpointPair const& endpointPair) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket)->GetOutputStreamWithEndpointPairAsync(*(void**)(&endpointPair), &value)); return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocket::MessageReceived(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { winrt::event_token eventCookie{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket)->add_MessageReceived(*(void**)(&eventHandler), put_abi(eventCookie))); return eventCookie; } template auto consume_Windows_Networking_Sockets_IDatagramSocket::MessageReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, MessageReceived(eventHandler)); } template auto consume_Windows_Networking_Sockets_IDatagramSocket::MessageReceived(winrt::event_token const& eventCookie) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket)->remove_MessageReceived(impl::bind_in(eventCookie)); } template auto consume_Windows_Networking_Sockets_IDatagramSocket2::BindServiceNameAsync(param::hstring const& localServiceName, winrt::Windows::Networking::Connectivity::NetworkAdapter const& adapter) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket2)->BindServiceNameAndAdapterAsync(*(void**)(&localServiceName), *(void**)(&adapter), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocket3::CancelIOAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket3)->CancelIOAsync(&operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocket3::EnableTransferOwnership(winrt::guid const& taskId) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket3)->EnableTransferOwnership(impl::bind_in(taskId))); } template auto consume_Windows_Networking_Sockets_IDatagramSocket3::EnableTransferOwnership(winrt::guid const& taskId, winrt::Windows::Networking::Sockets::SocketActivityConnectedStandbyAction const& connectedStandbyAction) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket3)->EnableTransferOwnershipWithConnectedStandbyAction(impl::bind_in(taskId), static_cast(connectedStandbyAction))); } template auto consume_Windows_Networking_Sockets_IDatagramSocket3::TransferOwnership(param::hstring const& socketId) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket3)->TransferOwnership(*(void**)(&socketId))); } template auto consume_Windows_Networking_Sockets_IDatagramSocket3::TransferOwnership(param::hstring const& socketId, winrt::Windows::Networking::Sockets::SocketActivityContext const& data) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket3)->TransferOwnershipWithContext(*(void**)(&socketId), *(void**)(&data))); } template auto consume_Windows_Networking_Sockets_IDatagramSocket3::TransferOwnership(param::hstring const& socketId, winrt::Windows::Networking::Sockets::SocketActivityContext const& data, winrt::Windows::Foundation::TimeSpan const& keepAliveTime) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocket3)->TransferOwnershipWithContextAndKeepAliveTime(*(void**)(&socketId), *(void**)(&data), impl::bind_in(keepAliveTime))); } template auto consume_Windows_Networking_Sockets_IDatagramSocketControl::QualityOfService() const { winrt::Windows::Networking::Sockets::SocketQualityOfService value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketControl)->get_QualityOfService(reinterpret_cast(&value))); return value; } template auto consume_Windows_Networking_Sockets_IDatagramSocketControl::QualityOfService(winrt::Windows::Networking::Sockets::SocketQualityOfService const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketControl)->put_QualityOfService(static_cast(value))); } template auto consume_Windows_Networking_Sockets_IDatagramSocketControl::OutboundUnicastHopLimit() const { uint8_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketControl)->get_OutboundUnicastHopLimit(&value)); return value; } template auto consume_Windows_Networking_Sockets_IDatagramSocketControl::OutboundUnicastHopLimit(uint8_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketControl)->put_OutboundUnicastHopLimit(value)); } template auto consume_Windows_Networking_Sockets_IDatagramSocketControl2::InboundBufferSizeInBytes() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketControl2)->get_InboundBufferSizeInBytes(&value)); return value; } template auto consume_Windows_Networking_Sockets_IDatagramSocketControl2::InboundBufferSizeInBytes(uint32_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketControl2)->put_InboundBufferSizeInBytes(value)); } template auto consume_Windows_Networking_Sockets_IDatagramSocketControl2::DontFragment() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketControl2)->get_DontFragment(&value)); return value; } template auto consume_Windows_Networking_Sockets_IDatagramSocketControl2::DontFragment(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketControl2)->put_DontFragment(value)); } template auto consume_Windows_Networking_Sockets_IDatagramSocketControl3::MulticastOnly() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketControl3)->get_MulticastOnly(&value)); return value; } template auto consume_Windows_Networking_Sockets_IDatagramSocketControl3::MulticastOnly(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketControl3)->put_MulticastOnly(value)); } template auto consume_Windows_Networking_Sockets_IDatagramSocketInformation::LocalAddress() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketInformation)->get_LocalAddress(&value)); return winrt::Windows::Networking::HostName{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocketInformation::LocalPort() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketInformation)->get_LocalPort(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocketInformation::RemoteAddress() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketInformation)->get_RemoteAddress(&value)); return winrt::Windows::Networking::HostName{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocketInformation::RemotePort() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketInformation)->get_RemotePort(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocketMessageReceivedEventArgs::RemoteAddress() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketMessageReceivedEventArgs)->get_RemoteAddress(&value)); return winrt::Windows::Networking::HostName{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocketMessageReceivedEventArgs::RemotePort() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketMessageReceivedEventArgs)->get_RemotePort(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocketMessageReceivedEventArgs::LocalAddress() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketMessageReceivedEventArgs)->get_LocalAddress(&value)); return winrt::Windows::Networking::HostName{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocketMessageReceivedEventArgs::GetDataReader() const { void* dataReader{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketMessageReceivedEventArgs)->GetDataReader(&dataReader)); return winrt::Windows::Storage::Streams::DataReader{ dataReader, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocketMessageReceivedEventArgs::GetDataStream() const { void* inputStream{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketMessageReceivedEventArgs)->GetDataStream(&inputStream)); return winrt::Windows::Storage::Streams::IInputStream{ inputStream, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocketStatics::GetEndpointPairsAsync(winrt::Windows::Networking::HostName const& remoteHostName, param::hstring const& remoteServiceName) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketStatics)->GetEndpointPairsAsync(*(void**)(&remoteHostName), *(void**)(&remoteServiceName), &operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IDatagramSocketStatics::GetEndpointPairsAsync(winrt::Windows::Networking::HostName const& remoteHostName, param::hstring const& remoteServiceName, winrt::Windows::Networking::HostNameSortOptions const& sortOptions) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IDatagramSocketStatics)->GetEndpointPairsWithSortOptionsAsync(*(void**)(&remoteHostName), *(void**)(&remoteServiceName), static_cast(sortOptions), &operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IMessageWebSocket::Control() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocket)->get_Control(&value)); return winrt::Windows::Networking::Sockets::MessageWebSocketControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IMessageWebSocket::Information() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocket)->get_Information(&value)); return winrt::Windows::Networking::Sockets::MessageWebSocketInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IMessageWebSocket::MessageReceived(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { winrt::event_token eventCookie{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocket)->add_MessageReceived(*(void**)(&eventHandler), put_abi(eventCookie))); return eventCookie; } template auto consume_Windows_Networking_Sockets_IMessageWebSocket::MessageReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, MessageReceived(eventHandler)); } template auto consume_Windows_Networking_Sockets_IMessageWebSocket::MessageReceived(winrt::event_token const& eventCookie) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocket)->remove_MessageReceived(impl::bind_in(eventCookie)); } template auto consume_Windows_Networking_Sockets_IMessageWebSocket2::ServerCustomValidationRequested(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { winrt::event_token eventCookie{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocket2)->add_ServerCustomValidationRequested(*(void**)(&eventHandler), put_abi(eventCookie))); return eventCookie; } template auto consume_Windows_Networking_Sockets_IMessageWebSocket2::ServerCustomValidationRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, ServerCustomValidationRequested(eventHandler)); } template auto consume_Windows_Networking_Sockets_IMessageWebSocket2::ServerCustomValidationRequested(winrt::event_token const& eventCookie) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocket2)->remove_ServerCustomValidationRequested(impl::bind_in(eventCookie)); } template auto consume_Windows_Networking_Sockets_IMessageWebSocket3::SendNonfinalFrameAsync(winrt::Windows::Storage::Streams::IBuffer const& data) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocket3)->SendNonfinalFrameAsync(*(void**)(&data), &operation)); return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IMessageWebSocket3::SendFinalFrameAsync(winrt::Windows::Storage::Streams::IBuffer const& data) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocket3)->SendFinalFrameAsync(*(void**)(&data), &operation)); return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IMessageWebSocketControl::MaxMessageSize() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocketControl)->get_MaxMessageSize(&value)); return value; } template auto consume_Windows_Networking_Sockets_IMessageWebSocketControl::MaxMessageSize(uint32_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocketControl)->put_MaxMessageSize(value)); } template auto consume_Windows_Networking_Sockets_IMessageWebSocketControl::MessageType() const { winrt::Windows::Networking::Sockets::SocketMessageType value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocketControl)->get_MessageType(reinterpret_cast(&value))); return value; } template auto consume_Windows_Networking_Sockets_IMessageWebSocketControl::MessageType(winrt::Windows::Networking::Sockets::SocketMessageType const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocketControl)->put_MessageType(static_cast(value))); } template auto consume_Windows_Networking_Sockets_IMessageWebSocketControl2::DesiredUnsolicitedPongInterval() const { winrt::Windows::Foundation::TimeSpan value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocketControl2)->get_DesiredUnsolicitedPongInterval(put_abi(value))); return value; } template auto consume_Windows_Networking_Sockets_IMessageWebSocketControl2::DesiredUnsolicitedPongInterval(winrt::Windows::Foundation::TimeSpan const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocketControl2)->put_DesiredUnsolicitedPongInterval(impl::bind_in(value))); } template auto consume_Windows_Networking_Sockets_IMessageWebSocketControl2::ActualUnsolicitedPongInterval() const { winrt::Windows::Foundation::TimeSpan value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocketControl2)->get_ActualUnsolicitedPongInterval(put_abi(value))); return value; } template auto consume_Windows_Networking_Sockets_IMessageWebSocketControl2::ReceiveMode() const { winrt::Windows::Networking::Sockets::MessageWebSocketReceiveMode value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocketControl2)->get_ReceiveMode(reinterpret_cast(&value))); return value; } template auto consume_Windows_Networking_Sockets_IMessageWebSocketControl2::ReceiveMode(winrt::Windows::Networking::Sockets::MessageWebSocketReceiveMode const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocketControl2)->put_ReceiveMode(static_cast(value))); } template auto consume_Windows_Networking_Sockets_IMessageWebSocketControl2::ClientCertificate() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocketControl2)->get_ClientCertificate(&value)); return winrt::Windows::Security::Cryptography::Certificates::Certificate{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IMessageWebSocketControl2::ClientCertificate(winrt::Windows::Security::Cryptography::Certificates::Certificate const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocketControl2)->put_ClientCertificate(*(void**)(&value))); } template auto consume_Windows_Networking_Sockets_IMessageWebSocketMessageReceivedEventArgs::MessageType() const { winrt::Windows::Networking::Sockets::SocketMessageType value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocketMessageReceivedEventArgs)->get_MessageType(reinterpret_cast(&value))); return value; } template auto consume_Windows_Networking_Sockets_IMessageWebSocketMessageReceivedEventArgs::GetDataReader() const { void* dataReader{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocketMessageReceivedEventArgs)->GetDataReader(&dataReader)); return winrt::Windows::Storage::Streams::DataReader{ dataReader, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IMessageWebSocketMessageReceivedEventArgs::GetDataStream() const { void* inputStream{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocketMessageReceivedEventArgs)->GetDataStream(&inputStream)); return winrt::Windows::Storage::Streams::IInputStream{ inputStream, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IMessageWebSocketMessageReceivedEventArgs2::IsMessageComplete() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IMessageWebSocketMessageReceivedEventArgs2)->get_IsMessageComplete(&value)); return value; } template auto consume_Windows_Networking_Sockets_IServerMessageWebSocket::MessageReceived(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerMessageWebSocket)->add_MessageReceived(*(void**)(&value), put_abi(token))); return token; } template auto consume_Windows_Networking_Sockets_IServerMessageWebSocket::MessageReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, MessageReceived(value)); } template auto consume_Windows_Networking_Sockets_IServerMessageWebSocket::MessageReceived(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerMessageWebSocket)->remove_MessageReceived(impl::bind_in(token)); } template auto consume_Windows_Networking_Sockets_IServerMessageWebSocket::Control() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerMessageWebSocket)->get_Control(&value)); return winrt::Windows::Networking::Sockets::ServerMessageWebSocketControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IServerMessageWebSocket::Information() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerMessageWebSocket)->get_Information(&value)); return winrt::Windows::Networking::Sockets::ServerMessageWebSocketInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IServerMessageWebSocket::OutputStream() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerMessageWebSocket)->get_OutputStream(&value)); return winrt::Windows::Storage::Streams::IOutputStream{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IServerMessageWebSocket::Closed(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerMessageWebSocket)->add_Closed(*(void**)(&value), put_abi(token))); return token; } template auto consume_Windows_Networking_Sockets_IServerMessageWebSocket::Closed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, Closed(value)); } template auto consume_Windows_Networking_Sockets_IServerMessageWebSocket::Closed(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerMessageWebSocket)->remove_Closed(impl::bind_in(token)); } template auto consume_Windows_Networking_Sockets_IServerMessageWebSocket::Close(uint16_t code, param::hstring const& reason) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerMessageWebSocket)->CloseWithStatus(code, *(void**)(&reason))); } template auto consume_Windows_Networking_Sockets_IServerMessageWebSocketControl::MessageType() const { winrt::Windows::Networking::Sockets::SocketMessageType value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerMessageWebSocketControl)->get_MessageType(reinterpret_cast(&value))); return value; } template auto consume_Windows_Networking_Sockets_IServerMessageWebSocketControl::MessageType(winrt::Windows::Networking::Sockets::SocketMessageType const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerMessageWebSocketControl)->put_MessageType(static_cast(value))); } template auto consume_Windows_Networking_Sockets_IServerMessageWebSocketInformation::BandwidthStatistics() const { winrt::Windows::Networking::Sockets::BandwidthStatistics value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerMessageWebSocketInformation)->get_BandwidthStatistics(put_abi(value))); return value; } template auto consume_Windows_Networking_Sockets_IServerMessageWebSocketInformation::Protocol() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerMessageWebSocketInformation)->get_Protocol(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IServerMessageWebSocketInformation::LocalAddress() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerMessageWebSocketInformation)->get_LocalAddress(&value)); return winrt::Windows::Networking::HostName{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IServerStreamWebSocket::Information() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerStreamWebSocket)->get_Information(&value)); return winrt::Windows::Networking::Sockets::ServerStreamWebSocketInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IServerStreamWebSocket::InputStream() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerStreamWebSocket)->get_InputStream(&value)); return winrt::Windows::Storage::Streams::IInputStream{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IServerStreamWebSocket::OutputStream() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerStreamWebSocket)->get_OutputStream(&value)); return winrt::Windows::Storage::Streams::IOutputStream{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IServerStreamWebSocket::Closed(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerStreamWebSocket)->add_Closed(*(void**)(&value), put_abi(token))); return token; } template auto consume_Windows_Networking_Sockets_IServerStreamWebSocket::Closed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, Closed(value)); } template auto consume_Windows_Networking_Sockets_IServerStreamWebSocket::Closed(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerStreamWebSocket)->remove_Closed(impl::bind_in(token)); } template auto consume_Windows_Networking_Sockets_IServerStreamWebSocket::Close(uint16_t code, param::hstring const& reason) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerStreamWebSocket)->CloseWithStatus(code, *(void**)(&reason))); } template auto consume_Windows_Networking_Sockets_IServerStreamWebSocketInformation::BandwidthStatistics() const { winrt::Windows::Networking::Sockets::BandwidthStatistics value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerStreamWebSocketInformation)->get_BandwidthStatistics(put_abi(value))); return value; } template auto consume_Windows_Networking_Sockets_IServerStreamWebSocketInformation::Protocol() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerStreamWebSocketInformation)->get_Protocol(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IServerStreamWebSocketInformation::LocalAddress() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IServerStreamWebSocketInformation)->get_LocalAddress(&value)); return winrt::Windows::Networking::HostName{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_ISocketActivityContext::Data() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::ISocketActivityContext)->get_Data(&value)); return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_ISocketActivityContextFactory::Create(winrt::Windows::Storage::Streams::IBuffer const& data) const { void* context{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::ISocketActivityContextFactory)->Create(*(void**)(&data), &context)); return winrt::Windows::Networking::Sockets::SocketActivityContext{ context, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_ISocketActivityInformation::TaskId() const { winrt::guid value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::ISocketActivityInformation)->get_TaskId(put_abi(value))); return value; } template auto consume_Windows_Networking_Sockets_ISocketActivityInformation::Id() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::ISocketActivityInformation)->get_Id(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_ISocketActivityInformation::SocketKind() const { winrt::Windows::Networking::Sockets::SocketActivityKind value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::ISocketActivityInformation)->get_SocketKind(reinterpret_cast(&value))); return value; } template auto consume_Windows_Networking_Sockets_ISocketActivityInformation::Context() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::ISocketActivityInformation)->get_Context(&value)); return winrt::Windows::Networking::Sockets::SocketActivityContext{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_ISocketActivityInformation::DatagramSocket() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::ISocketActivityInformation)->get_DatagramSocket(&value)); return winrt::Windows::Networking::Sockets::DatagramSocket{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_ISocketActivityInformation::StreamSocket() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::ISocketActivityInformation)->get_StreamSocket(&value)); return winrt::Windows::Networking::Sockets::StreamSocket{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_ISocketActivityInformation::StreamSocketListener() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::ISocketActivityInformation)->get_StreamSocketListener(&value)); return winrt::Windows::Networking::Sockets::StreamSocketListener{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_ISocketActivityInformationStatics::AllSockets() const { void* sockets{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::ISocketActivityInformationStatics)->get_AllSockets(&sockets)); return winrt::Windows::Foundation::Collections::IMapView{ sockets, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_ISocketActivityTriggerDetails::Reason() const { winrt::Windows::Networking::Sockets::SocketActivityTriggerReason value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::ISocketActivityTriggerDetails)->get_Reason(reinterpret_cast(&value))); return value; } template auto consume_Windows_Networking_Sockets_ISocketActivityTriggerDetails::SocketInformation() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::ISocketActivityTriggerDetails)->get_SocketInformation(&value)); return winrt::Windows::Networking::Sockets::SocketActivityInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_ISocketErrorStatics::GetStatus(int32_t hresult) const { winrt::Windows::Networking::Sockets::SocketErrorStatus status{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::ISocketErrorStatics)->GetStatus(hresult, reinterpret_cast(&status))); return status; } template auto consume_Windows_Networking_Sockets_IStreamSocket::Control() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket)->get_Control(&value)); return winrt::Windows::Networking::Sockets::StreamSocketControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocket::Information() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket)->get_Information(&value)); return winrt::Windows::Networking::Sockets::StreamSocketInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocket::InputStream() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket)->get_InputStream(&value)); return winrt::Windows::Storage::Streams::IInputStream{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocket::OutputStream() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket)->get_OutputStream(&value)); return winrt::Windows::Storage::Streams::IOutputStream{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocket::ConnectAsync(winrt::Windows::Networking::EndpointPair const& endpointPair) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket)->ConnectWithEndpointPairAsync(*(void**)(&endpointPair), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocket::ConnectAsync(winrt::Windows::Networking::HostName const& remoteHostName, param::hstring const& remoteServiceName) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket)->ConnectAsync(*(void**)(&remoteHostName), *(void**)(&remoteServiceName), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocket::ConnectAsync(winrt::Windows::Networking::EndpointPair const& endpointPair, winrt::Windows::Networking::Sockets::SocketProtectionLevel const& protectionLevel) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket)->ConnectWithEndpointPairAndProtectionLevelAsync(*(void**)(&endpointPair), static_cast(protectionLevel), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocket::ConnectAsync(winrt::Windows::Networking::HostName const& remoteHostName, param::hstring const& remoteServiceName, winrt::Windows::Networking::Sockets::SocketProtectionLevel const& protectionLevel) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket)->ConnectWithProtectionLevelAsync(*(void**)(&remoteHostName), *(void**)(&remoteServiceName), static_cast(protectionLevel), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocket::UpgradeToSslAsync(winrt::Windows::Networking::Sockets::SocketProtectionLevel const& protectionLevel, winrt::Windows::Networking::HostName const& validationHostName) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket)->UpgradeToSslAsync(static_cast(protectionLevel), *(void**)(&validationHostName), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocket2::ConnectAsync(winrt::Windows::Networking::HostName const& remoteHostName, param::hstring const& remoteServiceName, winrt::Windows::Networking::Sockets::SocketProtectionLevel const& protectionLevel, winrt::Windows::Networking::Connectivity::NetworkAdapter const& adapter) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket2)->ConnectWithProtectionLevelAndAdapterAsync(*(void**)(&remoteHostName), *(void**)(&remoteServiceName), static_cast(protectionLevel), *(void**)(&adapter), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocket3::CancelIOAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket3)->CancelIOAsync(&operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocket3::EnableTransferOwnership(winrt::guid const& taskId) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket3)->EnableTransferOwnership(impl::bind_in(taskId))); } template auto consume_Windows_Networking_Sockets_IStreamSocket3::EnableTransferOwnership(winrt::guid const& taskId, winrt::Windows::Networking::Sockets::SocketActivityConnectedStandbyAction const& connectedStandbyAction) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket3)->EnableTransferOwnershipWithConnectedStandbyAction(impl::bind_in(taskId), static_cast(connectedStandbyAction))); } template auto consume_Windows_Networking_Sockets_IStreamSocket3::TransferOwnership(param::hstring const& socketId) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket3)->TransferOwnership(*(void**)(&socketId))); } template auto consume_Windows_Networking_Sockets_IStreamSocket3::TransferOwnership(param::hstring const& socketId, winrt::Windows::Networking::Sockets::SocketActivityContext const& data) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket3)->TransferOwnershipWithContext(*(void**)(&socketId), *(void**)(&data))); } template auto consume_Windows_Networking_Sockets_IStreamSocket3::TransferOwnership(param::hstring const& socketId, winrt::Windows::Networking::Sockets::SocketActivityContext const& data, winrt::Windows::Foundation::TimeSpan const& keepAliveTime) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocket3)->TransferOwnershipWithContextAndKeepAliveTime(*(void**)(&socketId), *(void**)(&data), impl::bind_in(keepAliveTime))); } template auto consume_Windows_Networking_Sockets_IStreamSocketControl::NoDelay() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl)->get_NoDelay(&value)); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketControl::NoDelay(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl)->put_NoDelay(value)); } template auto consume_Windows_Networking_Sockets_IStreamSocketControl::KeepAlive() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl)->get_KeepAlive(&value)); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketControl::KeepAlive(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl)->put_KeepAlive(value)); } template auto consume_Windows_Networking_Sockets_IStreamSocketControl::OutboundBufferSizeInBytes() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl)->get_OutboundBufferSizeInBytes(&value)); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketControl::OutboundBufferSizeInBytes(uint32_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl)->put_OutboundBufferSizeInBytes(value)); } template auto consume_Windows_Networking_Sockets_IStreamSocketControl::QualityOfService() const { winrt::Windows::Networking::Sockets::SocketQualityOfService value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl)->get_QualityOfService(reinterpret_cast(&value))); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketControl::QualityOfService(winrt::Windows::Networking::Sockets::SocketQualityOfService const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl)->put_QualityOfService(static_cast(value))); } template auto consume_Windows_Networking_Sockets_IStreamSocketControl::OutboundUnicastHopLimit() const { uint8_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl)->get_OutboundUnicastHopLimit(&value)); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketControl::OutboundUnicastHopLimit(uint8_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl)->put_OutboundUnicastHopLimit(value)); } template auto consume_Windows_Networking_Sockets_IStreamSocketControl2::IgnorableServerCertificateErrors() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl2)->get_IgnorableServerCertificateErrors(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketControl3::SerializeConnectionAttempts() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl3)->get_SerializeConnectionAttempts(&value)); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketControl3::SerializeConnectionAttempts(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl3)->put_SerializeConnectionAttempts(value)); } template auto consume_Windows_Networking_Sockets_IStreamSocketControl3::ClientCertificate() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl3)->get_ClientCertificate(&value)); return winrt::Windows::Security::Cryptography::Certificates::Certificate{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketControl3::ClientCertificate(winrt::Windows::Security::Cryptography::Certificates::Certificate const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl3)->put_ClientCertificate(*(void**)(&value))); } template auto consume_Windows_Networking_Sockets_IStreamSocketControl4::MinProtectionLevel() const { winrt::Windows::Networking::Sockets::SocketProtectionLevel value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl4)->get_MinProtectionLevel(reinterpret_cast(&value))); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketControl4::MinProtectionLevel(winrt::Windows::Networking::Sockets::SocketProtectionLevel const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketControl4)->put_MinProtectionLevel(static_cast(value))); } template auto consume_Windows_Networking_Sockets_IStreamSocketInformation::LocalAddress() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketInformation)->get_LocalAddress(&value)); return winrt::Windows::Networking::HostName{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketInformation::LocalPort() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketInformation)->get_LocalPort(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketInformation::RemoteHostName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketInformation)->get_RemoteHostName(&value)); return winrt::Windows::Networking::HostName{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketInformation::RemoteAddress() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketInformation)->get_RemoteAddress(&value)); return winrt::Windows::Networking::HostName{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketInformation::RemoteServiceName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketInformation)->get_RemoteServiceName(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketInformation::RemotePort() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketInformation)->get_RemotePort(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketInformation::RoundTripTimeStatistics() const { winrt::Windows::Networking::Sockets::RoundTripTimeStatistics value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketInformation)->get_RoundTripTimeStatistics(put_abi(value))); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketInformation::BandwidthStatistics() const { winrt::Windows::Networking::Sockets::BandwidthStatistics value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketInformation)->get_BandwidthStatistics(put_abi(value))); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketInformation::ProtectionLevel() const { winrt::Windows::Networking::Sockets::SocketProtectionLevel value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketInformation)->get_ProtectionLevel(reinterpret_cast(&value))); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketInformation::SessionKey() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketInformation)->get_SessionKey(&value)); return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketInformation2::ServerCertificateErrorSeverity() const { winrt::Windows::Networking::Sockets::SocketSslErrorSeverity value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketInformation2)->get_ServerCertificateErrorSeverity(reinterpret_cast(&value))); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketInformation2::ServerCertificateErrors() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketInformation2)->get_ServerCertificateErrors(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketInformation2::ServerCertificate() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketInformation2)->get_ServerCertificate(&value)); return winrt::Windows::Security::Cryptography::Certificates::Certificate{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketInformation2::ServerIntermediateCertificates() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketInformation2)->get_ServerIntermediateCertificates(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketListener::Control() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListener)->get_Control(&value)); return winrt::Windows::Networking::Sockets::StreamSocketListenerControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketListener::Information() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListener)->get_Information(&value)); return winrt::Windows::Networking::Sockets::StreamSocketListenerInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketListener::BindServiceNameAsync(param::hstring const& localServiceName) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListener)->BindServiceNameAsync(*(void**)(&localServiceName), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketListener::BindEndpointAsync(winrt::Windows::Networking::HostName const& localHostName, param::hstring const& localServiceName) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListener)->BindEndpointAsync(*(void**)(&localHostName), *(void**)(&localServiceName), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketListener::ConnectionReceived(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { winrt::event_token eventCookie{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListener)->add_ConnectionReceived(*(void**)(&eventHandler), put_abi(eventCookie))); return eventCookie; } template auto consume_Windows_Networking_Sockets_IStreamSocketListener::ConnectionReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, ConnectionReceived(eventHandler)); } template auto consume_Windows_Networking_Sockets_IStreamSocketListener::ConnectionReceived(winrt::event_token const& eventCookie) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListener)->remove_ConnectionReceived(impl::bind_in(eventCookie)); } template auto consume_Windows_Networking_Sockets_IStreamSocketListener2::BindServiceNameAsync(param::hstring const& localServiceName, winrt::Windows::Networking::Sockets::SocketProtectionLevel const& protectionLevel) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListener2)->BindServiceNameWithProtectionLevelAsync(*(void**)(&localServiceName), static_cast(protectionLevel), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketListener2::BindServiceNameAsync(param::hstring const& localServiceName, winrt::Windows::Networking::Sockets::SocketProtectionLevel const& protectionLevel, winrt::Windows::Networking::Connectivity::NetworkAdapter const& adapter) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListener2)->BindServiceNameWithProtectionLevelAndAdapterAsync(*(void**)(&localServiceName), static_cast(protectionLevel), *(void**)(&adapter), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketListener3::CancelIOAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListener3)->CancelIOAsync(&operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketListener3::EnableTransferOwnership(winrt::guid const& taskId) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListener3)->EnableTransferOwnership(impl::bind_in(taskId))); } template auto consume_Windows_Networking_Sockets_IStreamSocketListener3::EnableTransferOwnership(winrt::guid const& taskId, winrt::Windows::Networking::Sockets::SocketActivityConnectedStandbyAction const& connectedStandbyAction) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListener3)->EnableTransferOwnershipWithConnectedStandbyAction(impl::bind_in(taskId), static_cast(connectedStandbyAction))); } template auto consume_Windows_Networking_Sockets_IStreamSocketListener3::TransferOwnership(param::hstring const& socketId) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListener3)->TransferOwnership(*(void**)(&socketId))); } template auto consume_Windows_Networking_Sockets_IStreamSocketListener3::TransferOwnership(param::hstring const& socketId, winrt::Windows::Networking::Sockets::SocketActivityContext const& data) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListener3)->TransferOwnershipWithContext(*(void**)(&socketId), *(void**)(&data))); } template auto consume_Windows_Networking_Sockets_IStreamSocketListenerConnectionReceivedEventArgs::Socket() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListenerConnectionReceivedEventArgs)->get_Socket(&value)); return winrt::Windows::Networking::Sockets::StreamSocket{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketListenerControl::QualityOfService() const { winrt::Windows::Networking::Sockets::SocketQualityOfService value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListenerControl)->get_QualityOfService(reinterpret_cast(&value))); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketListenerControl::QualityOfService(winrt::Windows::Networking::Sockets::SocketQualityOfService const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListenerControl)->put_QualityOfService(static_cast(value))); } template auto consume_Windows_Networking_Sockets_IStreamSocketListenerControl2::NoDelay() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListenerControl2)->get_NoDelay(&value)); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketListenerControl2::NoDelay(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListenerControl2)->put_NoDelay(value)); } template auto consume_Windows_Networking_Sockets_IStreamSocketListenerControl2::KeepAlive() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListenerControl2)->get_KeepAlive(&value)); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketListenerControl2::KeepAlive(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListenerControl2)->put_KeepAlive(value)); } template auto consume_Windows_Networking_Sockets_IStreamSocketListenerControl2::OutboundBufferSizeInBytes() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListenerControl2)->get_OutboundBufferSizeInBytes(&value)); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketListenerControl2::OutboundBufferSizeInBytes(uint32_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListenerControl2)->put_OutboundBufferSizeInBytes(value)); } template auto consume_Windows_Networking_Sockets_IStreamSocketListenerControl2::OutboundUnicastHopLimit() const { uint8_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListenerControl2)->get_OutboundUnicastHopLimit(&value)); return value; } template auto consume_Windows_Networking_Sockets_IStreamSocketListenerControl2::OutboundUnicastHopLimit(uint8_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListenerControl2)->put_OutboundUnicastHopLimit(value)); } template auto consume_Windows_Networking_Sockets_IStreamSocketListenerInformation::LocalPort() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketListenerInformation)->get_LocalPort(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketStatics::GetEndpointPairsAsync(winrt::Windows::Networking::HostName const& remoteHostName, param::hstring const& remoteServiceName) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketStatics)->GetEndpointPairsAsync(*(void**)(&remoteHostName), *(void**)(&remoteServiceName), &operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamSocketStatics::GetEndpointPairsAsync(winrt::Windows::Networking::HostName const& remoteHostName, param::hstring const& remoteServiceName, winrt::Windows::Networking::HostNameSortOptions const& sortOptions) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamSocketStatics)->GetEndpointPairsWithSortOptionsAsync(*(void**)(&remoteHostName), *(void**)(&remoteServiceName), static_cast(sortOptions), &operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamWebSocket::Control() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamWebSocket)->get_Control(&value)); return winrt::Windows::Networking::Sockets::StreamWebSocketControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamWebSocket::Information() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamWebSocket)->get_Information(&value)); return winrt::Windows::Networking::Sockets::StreamWebSocketInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamWebSocket::InputStream() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamWebSocket)->get_InputStream(&value)); return winrt::Windows::Storage::Streams::IInputStream{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamWebSocket2::ServerCustomValidationRequested(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { winrt::event_token eventCookie{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamWebSocket2)->add_ServerCustomValidationRequested(*(void**)(&eventHandler), put_abi(eventCookie))); return eventCookie; } template auto consume_Windows_Networking_Sockets_IStreamWebSocket2::ServerCustomValidationRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, ServerCustomValidationRequested(eventHandler)); } template auto consume_Windows_Networking_Sockets_IStreamWebSocket2::ServerCustomValidationRequested(winrt::event_token const& eventCookie) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamWebSocket2)->remove_ServerCustomValidationRequested(impl::bind_in(eventCookie)); } template auto consume_Windows_Networking_Sockets_IStreamWebSocketControl::NoDelay() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamWebSocketControl)->get_NoDelay(&value)); return value; } template auto consume_Windows_Networking_Sockets_IStreamWebSocketControl::NoDelay(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamWebSocketControl)->put_NoDelay(value)); } template auto consume_Windows_Networking_Sockets_IStreamWebSocketControl2::DesiredUnsolicitedPongInterval() const { winrt::Windows::Foundation::TimeSpan value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamWebSocketControl2)->get_DesiredUnsolicitedPongInterval(put_abi(value))); return value; } template auto consume_Windows_Networking_Sockets_IStreamWebSocketControl2::DesiredUnsolicitedPongInterval(winrt::Windows::Foundation::TimeSpan const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamWebSocketControl2)->put_DesiredUnsolicitedPongInterval(impl::bind_in(value))); } template auto consume_Windows_Networking_Sockets_IStreamWebSocketControl2::ActualUnsolicitedPongInterval() const { winrt::Windows::Foundation::TimeSpan value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamWebSocketControl2)->get_ActualUnsolicitedPongInterval(put_abi(value))); return value; } template auto consume_Windows_Networking_Sockets_IStreamWebSocketControl2::ClientCertificate() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamWebSocketControl2)->get_ClientCertificate(&value)); return winrt::Windows::Security::Cryptography::Certificates::Certificate{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IStreamWebSocketControl2::ClientCertificate(winrt::Windows::Security::Cryptography::Certificates::Certificate const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IStreamWebSocketControl2)->put_ClientCertificate(*(void**)(&value))); } template auto consume_Windows_Networking_Sockets_IWebSocket::OutputStream() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocket)->get_OutputStream(&value)); return winrt::Windows::Storage::Streams::IOutputStream{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IWebSocket::ConnectAsync(winrt::Windows::Foundation::Uri const& uri) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocket)->ConnectAsync(*(void**)(&uri), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IWebSocket::SetRequestHeader(param::hstring const& headerName, param::hstring const& headerValue) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocket)->SetRequestHeader(*(void**)(&headerName), *(void**)(&headerValue))); } template auto consume_Windows_Networking_Sockets_IWebSocket::Closed(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { winrt::event_token eventCookie{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocket)->add_Closed(*(void**)(&eventHandler), put_abi(eventCookie))); return eventCookie; } template auto consume_Windows_Networking_Sockets_IWebSocket::Closed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, Closed(eventHandler)); } template auto consume_Windows_Networking_Sockets_IWebSocket::Closed(winrt::event_token const& eventCookie) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocket)->remove_Closed(impl::bind_in(eventCookie)); } template auto consume_Windows_Networking_Sockets_IWebSocket::Close(uint16_t code, param::hstring const& reason) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocket)->CloseWithStatus(code, *(void**)(&reason))); } template auto consume_Windows_Networking_Sockets_IWebSocketClosedEventArgs::Code() const { uint16_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketClosedEventArgs)->get_Code(&value)); return value; } template auto consume_Windows_Networking_Sockets_IWebSocketClosedEventArgs::Reason() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketClosedEventArgs)->get_Reason(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IWebSocketControl::OutboundBufferSizeInBytes() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketControl)->get_OutboundBufferSizeInBytes(&value)); return value; } template auto consume_Windows_Networking_Sockets_IWebSocketControl::OutboundBufferSizeInBytes(uint32_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketControl)->put_OutboundBufferSizeInBytes(value)); } template auto consume_Windows_Networking_Sockets_IWebSocketControl::ServerCredential() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketControl)->get_ServerCredential(&value)); return winrt::Windows::Security::Credentials::PasswordCredential{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IWebSocketControl::ServerCredential(winrt::Windows::Security::Credentials::PasswordCredential const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketControl)->put_ServerCredential(*(void**)(&value))); } template auto consume_Windows_Networking_Sockets_IWebSocketControl::ProxyCredential() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketControl)->get_ProxyCredential(&value)); return winrt::Windows::Security::Credentials::PasswordCredential{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IWebSocketControl::ProxyCredential(winrt::Windows::Security::Credentials::PasswordCredential const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketControl)->put_ProxyCredential(*(void**)(&value))); } template auto consume_Windows_Networking_Sockets_IWebSocketControl::SupportedProtocols() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketControl)->get_SupportedProtocols(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IWebSocketControl2::IgnorableServerCertificateErrors() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketControl2)->get_IgnorableServerCertificateErrors(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IWebSocketErrorStatics::GetStatus(int32_t hresult) const { winrt::Windows::Web::WebErrorStatus status{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketErrorStatics)->GetStatus(hresult, reinterpret_cast(&status))); return status; } template auto consume_Windows_Networking_Sockets_IWebSocketInformation::LocalAddress() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketInformation)->get_LocalAddress(&value)); return winrt::Windows::Networking::HostName{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IWebSocketInformation::BandwidthStatistics() const { winrt::Windows::Networking::Sockets::BandwidthStatistics value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketInformation)->get_BandwidthStatistics(put_abi(value))); return value; } template auto consume_Windows_Networking_Sockets_IWebSocketInformation::Protocol() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketInformation)->get_Protocol(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IWebSocketInformation2::ServerCertificate() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketInformation2)->get_ServerCertificate(&value)); return winrt::Windows::Security::Cryptography::Certificates::Certificate{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IWebSocketInformation2::ServerCertificateErrorSeverity() const { winrt::Windows::Networking::Sockets::SocketSslErrorSeverity value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketInformation2)->get_ServerCertificateErrorSeverity(reinterpret_cast(&value))); return value; } template auto consume_Windows_Networking_Sockets_IWebSocketInformation2::ServerCertificateErrors() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketInformation2)->get_ServerCertificateErrors(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IWebSocketInformation2::ServerIntermediateCertificates() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketInformation2)->get_ServerIntermediateCertificates(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IWebSocketServerCustomValidationRequestedEventArgs::ServerCertificate() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketServerCustomValidationRequestedEventArgs)->get_ServerCertificate(&value)); return winrt::Windows::Security::Cryptography::Certificates::Certificate{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IWebSocketServerCustomValidationRequestedEventArgs::ServerCertificateErrorSeverity() const { winrt::Windows::Networking::Sockets::SocketSslErrorSeverity value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketServerCustomValidationRequestedEventArgs)->get_ServerCertificateErrorSeverity(reinterpret_cast(&value))); return value; } template auto consume_Windows_Networking_Sockets_IWebSocketServerCustomValidationRequestedEventArgs::ServerCertificateErrors() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketServerCustomValidationRequestedEventArgs)->get_ServerCertificateErrors(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IWebSocketServerCustomValidationRequestedEventArgs::ServerIntermediateCertificates() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketServerCustomValidationRequestedEventArgs)->get_ServerIntermediateCertificates(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_Sockets_IWebSocketServerCustomValidationRequestedEventArgs::Reject() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketServerCustomValidationRequestedEventArgs)->Reject()); } template auto consume_Windows_Networking_Sockets_IWebSocketServerCustomValidationRequestedEventArgs::GetDeferral() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::Sockets::IWebSocketServerCustomValidationRequestedEventArgs)->GetDeferral(&result)); return winrt::Windows::Foundation::Deferral{ result, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ControlChannelTriggerId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ControlChannelTriggerId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerKeepAliveIntervalInMinutes(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ServerKeepAliveIntervalInMinutes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ServerKeepAliveIntervalInMinutes(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ServerKeepAliveIntervalInMinutes(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CurrentKeepAliveIntervalInMinutes(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentKeepAliveIntervalInMinutes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TransportObject(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TransportObject()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_KeepAliveTrigger(void** trigger) noexcept final try { clear_abi(trigger); typename D::abi_guard guard(this->shim()); *trigger = detach_from(this->shim().KeepAliveTrigger()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PushNotificationTrigger(void** trigger) noexcept final try { clear_abi(trigger); typename D::abi_guard guard(this->shim()); *trigger = detach_from(this->shim().PushNotificationTrigger()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UsingTransport(void* transport) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UsingTransport(*reinterpret_cast(&transport)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall WaitForPushEnabled(int32_t* channelTriggerStatus) noexcept final try { typename D::abi_guard guard(this->shim()); *channelTriggerStatus = detach_from(this->shim().WaitForPushEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall DecreaseNetworkKeepAliveInterval() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DecreaseNetworkKeepAliveInterval(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FlushTransport() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().FlushTransport(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsWakeFromLowPowerSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsWakeFromLowPowerSupported()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_ControlChannelTrigger(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ControlChannelTrigger()); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateControlChannelTrigger(void* channelId, uint32_t serverKeepAliveIntervalInMinutes, void** notificationChannel) noexcept final try { clear_abi(notificationChannel); typename D::abi_guard guard(this->shim()); *notificationChannel = detach_from(this->shim().CreateControlChannelTrigger(*reinterpret_cast(&channelId), serverKeepAliveIntervalInMinutes)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateControlChannelTriggerEx(void* channelId, uint32_t serverKeepAliveIntervalInMinutes, int32_t resourceRequestType, void** notificationChannel) noexcept final try { clear_abi(notificationChannel); typename D::abi_guard guard(this->shim()); *notificationChannel = detach_from(this->shim().CreateControlChannelTriggerEx(*reinterpret_cast(&channelId), serverKeepAliveIntervalInMinutes, *reinterpret_cast(&resourceRequestType))); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_ResetReason(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ResetReason()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HardwareSlotReset(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HardwareSlotReset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SoftwareSlotReset(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SoftwareSlotReset()); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Control(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Control()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Information(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Information()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OutputStream(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OutputStream()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ConnectAsync(void* remoteHostName, void* remoteServiceName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().ConnectAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ConnectWithEndpointPairAsync(void* endpointPair, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().ConnectAsync(*reinterpret_cast(&endpointPair))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall BindServiceNameAsync(void* localServiceName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().BindServiceNameAsync(*reinterpret_cast(&localServiceName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall BindEndpointAsync(void* localHostName, void* localServiceName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().BindEndpointAsync(*reinterpret_cast(&localHostName), *reinterpret_cast(&localServiceName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall JoinMulticastGroup(void* host) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().JoinMulticastGroup(*reinterpret_cast(&host)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetOutputStreamAsync(void* remoteHostName, void* remoteServiceName, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetOutputStreamAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetOutputStreamWithEndpointPairAsync(void* endpointPair, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetOutputStreamAsync(*reinterpret_cast(&endpointPair))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_MessageReceived(void* eventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().MessageReceived(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_MessageReceived(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().MessageReceived(*reinterpret_cast(&eventCookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall BindServiceNameAndAdapterAsync(void* localServiceName, void* adapter, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().BindServiceNameAsync(*reinterpret_cast(&localServiceName), *reinterpret_cast(&adapter))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CancelIOAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().CancelIOAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EnableTransferOwnership(winrt::guid taskId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EnableTransferOwnership(*reinterpret_cast(&taskId)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EnableTransferOwnershipWithConnectedStandbyAction(winrt::guid taskId, int32_t connectedStandbyAction) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EnableTransferOwnership(*reinterpret_cast(&taskId), *reinterpret_cast(&connectedStandbyAction)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TransferOwnership(void* socketId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TransferOwnershipWithContext(void* socketId, void* data) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId), *reinterpret_cast(&data)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TransferOwnershipWithContextAndKeepAliveTime(void* socketId, void* data, int64_t keepAliveTime) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId), *reinterpret_cast(&data), *reinterpret_cast(&keepAliveTime)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_QualityOfService(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().QualityOfService()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_QualityOfService(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().QualityOfService(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OutboundUnicastHopLimit(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OutboundUnicastHopLimit()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_OutboundUnicastHopLimit(uint8_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OutboundUnicastHopLimit(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_InboundBufferSizeInBytes(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InboundBufferSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_InboundBufferSizeInBytes(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().InboundBufferSizeInBytes(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DontFragment(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DontFragment()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DontFragment(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DontFragment(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MulticastOnly(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MulticastOnly()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MulticastOnly(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MulticastOnly(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_LocalAddress(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LocalAddress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LocalPort(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LocalPort()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RemoteAddress(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RemoteAddress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RemotePort(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RemotePort()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_RemoteAddress(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RemoteAddress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RemotePort(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RemotePort()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LocalAddress(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LocalAddress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDataReader(void** dataReader) noexcept final try { clear_abi(dataReader); typename D::abi_guard guard(this->shim()); *dataReader = detach_from(this->shim().GetDataReader()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDataStream(void** inputStream) noexcept final try { clear_abi(inputStream); typename D::abi_guard guard(this->shim()); *inputStream = detach_from(this->shim().GetDataStream()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetEndpointPairsAsync(void* remoteHostName, void* remoteServiceName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetEndpointPairsAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetEndpointPairsWithSortOptionsAsync(void* remoteHostName, void* remoteServiceName, uint32_t sortOptions, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetEndpointPairsAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName), *reinterpret_cast(&sortOptions))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Control(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Control()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Information(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Information()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_MessageReceived(void* eventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().MessageReceived(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_MessageReceived(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().MessageReceived(*reinterpret_cast(&eventCookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_ServerCustomValidationRequested(void* eventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().ServerCustomValidationRequested(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ServerCustomValidationRequested(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ServerCustomValidationRequested(*reinterpret_cast(&eventCookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall SendNonfinalFrameAsync(void* data, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().SendNonfinalFrameAsync(*reinterpret_cast(&data))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SendFinalFrameAsync(void* data, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().SendFinalFrameAsync(*reinterpret_cast(&data))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MaxMessageSize(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxMessageSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MaxMessageSize(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MaxMessageSize(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MessageType(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MessageType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MessageType(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MessageType(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DesiredUnsolicitedPongInterval(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DesiredUnsolicitedPongInterval()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DesiredUnsolicitedPongInterval(int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DesiredUnsolicitedPongInterval(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ActualUnsolicitedPongInterval(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ActualUnsolicitedPongInterval()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ReceiveMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ReceiveMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ReceiveMode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ReceiveMode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ClientCertificate(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ClientCertificate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ClientCertificate(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClientCertificate(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MessageType(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MessageType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDataReader(void** dataReader) noexcept final try { clear_abi(dataReader); typename D::abi_guard guard(this->shim()); *dataReader = detach_from(this->shim().GetDataReader()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDataStream(void** inputStream) noexcept final try { clear_abi(inputStream); typename D::abi_guard guard(this->shim()); *inputStream = detach_from(this->shim().GetDataStream()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsMessageComplete(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsMessageComplete()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_MessageReceived(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().MessageReceived(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_MessageReceived(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().MessageReceived(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_Control(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Control()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Information(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Information()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OutputStream(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OutputStream()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_Closed(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Closed(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Closed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Closed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall CloseWithStatus(uint16_t code, void* reason) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Close(code, *reinterpret_cast(&reason)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MessageType(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MessageType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MessageType(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MessageType(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_BandwidthStatistics(struct struct_Windows_Networking_Sockets_BandwidthStatistics* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BandwidthStatistics()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Protocol(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Protocol()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LocalAddress(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LocalAddress()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Information(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Information()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InputStream(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InputStream()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OutputStream(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OutputStream()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_Closed(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Closed(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Closed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Closed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall CloseWithStatus(uint16_t code, void* reason) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Close(code, *reinterpret_cast(&reason)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_BandwidthStatistics(struct struct_Windows_Networking_Sockets_BandwidthStatistics* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BandwidthStatistics()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Protocol(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Protocol()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LocalAddress(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LocalAddress()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Data(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Data()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void* data, void** context) noexcept final try { clear_abi(context); typename D::abi_guard guard(this->shim()); *context = detach_from(this->shim().Create(*reinterpret_cast(&data))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_TaskId(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TaskId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SocketKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SocketKind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Context(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Context()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DatagramSocket(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DatagramSocket()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StreamSocket(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StreamSocket()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StreamSocketListener(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StreamSocketListener()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AllSockets(void** sockets) noexcept final try { clear_abi(sockets); typename D::abi_guard guard(this->shim()); *sockets = detach_from>(this->shim().AllSockets()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Reason(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Reason()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SocketInformation(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SocketInformation()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetStatus(int32_t hresult, int32_t* status) noexcept final try { typename D::abi_guard guard(this->shim()); *status = detach_from(this->shim().GetStatus(hresult)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Control(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Control()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Information(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Information()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InputStream(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InputStream()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OutputStream(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OutputStream()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ConnectWithEndpointPairAsync(void* endpointPair, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().ConnectAsync(*reinterpret_cast(&endpointPair))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ConnectAsync(void* remoteHostName, void* remoteServiceName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().ConnectAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ConnectWithEndpointPairAndProtectionLevelAsync(void* endpointPair, int32_t protectionLevel, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().ConnectAsync(*reinterpret_cast(&endpointPair), *reinterpret_cast(&protectionLevel))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ConnectWithProtectionLevelAsync(void* remoteHostName, void* remoteServiceName, int32_t protectionLevel, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().ConnectAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName), *reinterpret_cast(&protectionLevel))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UpgradeToSslAsync(int32_t protectionLevel, void* validationHostName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().UpgradeToSslAsync(*reinterpret_cast(&protectionLevel), *reinterpret_cast(&validationHostName))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall ConnectWithProtectionLevelAndAdapterAsync(void* remoteHostName, void* remoteServiceName, int32_t protectionLevel, void* adapter, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().ConnectAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName), *reinterpret_cast(&protectionLevel), *reinterpret_cast(&adapter))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CancelIOAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().CancelIOAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EnableTransferOwnership(winrt::guid taskId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EnableTransferOwnership(*reinterpret_cast(&taskId)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EnableTransferOwnershipWithConnectedStandbyAction(winrt::guid taskId, int32_t connectedStandbyAction) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EnableTransferOwnership(*reinterpret_cast(&taskId), *reinterpret_cast(&connectedStandbyAction)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TransferOwnership(void* socketId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TransferOwnershipWithContext(void* socketId, void* data) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId), *reinterpret_cast(&data)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TransferOwnershipWithContextAndKeepAliveTime(void* socketId, void* data, int64_t keepAliveTime) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId), *reinterpret_cast(&data), *reinterpret_cast(&keepAliveTime)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_NoDelay(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NoDelay()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_NoDelay(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().NoDelay(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_KeepAlive(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().KeepAlive()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_KeepAlive(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().KeepAlive(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OutboundBufferSizeInBytes(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OutboundBufferSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_OutboundBufferSizeInBytes(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OutboundBufferSizeInBytes(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_QualityOfService(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().QualityOfService()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_QualityOfService(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().QualityOfService(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OutboundUnicastHopLimit(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OutboundUnicastHopLimit()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_OutboundUnicastHopLimit(uint8_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OutboundUnicastHopLimit(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IgnorableServerCertificateErrors(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().IgnorableServerCertificateErrors()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SerializeConnectionAttempts(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SerializeConnectionAttempts()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SerializeConnectionAttempts(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SerializeConnectionAttempts(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ClientCertificate(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ClientCertificate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ClientCertificate(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClientCertificate(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MinProtectionLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MinProtectionLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MinProtectionLevel(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MinProtectionLevel(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_LocalAddress(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LocalAddress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LocalPort(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LocalPort()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RemoteHostName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RemoteHostName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RemoteAddress(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RemoteAddress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RemoteServiceName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RemoteServiceName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RemotePort(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RemotePort()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RoundTripTimeStatistics(struct struct_Windows_Networking_Sockets_RoundTripTimeStatistics* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RoundTripTimeStatistics()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BandwidthStatistics(struct struct_Windows_Networking_Sockets_BandwidthStatistics* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BandwidthStatistics()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ProtectionLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProtectionLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SessionKey(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SessionKey()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ServerCertificateErrorSeverity(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ServerCertificateErrorSeverity()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerCertificateErrors(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ServerCertificateErrors()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerCertificate(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ServerCertificate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerIntermediateCertificates(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ServerIntermediateCertificates()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Control(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Control()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Information(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Information()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall BindServiceNameAsync(void* localServiceName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().BindServiceNameAsync(*reinterpret_cast(&localServiceName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall BindEndpointAsync(void* localHostName, void* localServiceName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().BindEndpointAsync(*reinterpret_cast(&localHostName), *reinterpret_cast(&localServiceName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_ConnectionReceived(void* eventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().ConnectionReceived(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ConnectionReceived(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ConnectionReceived(*reinterpret_cast(&eventCookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall BindServiceNameWithProtectionLevelAsync(void* localServiceName, int32_t protectionLevel, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().BindServiceNameAsync(*reinterpret_cast(&localServiceName), *reinterpret_cast(&protectionLevel))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall BindServiceNameWithProtectionLevelAndAdapterAsync(void* localServiceName, int32_t protectionLevel, void* adapter, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().BindServiceNameAsync(*reinterpret_cast(&localServiceName), *reinterpret_cast(&protectionLevel), *reinterpret_cast(&adapter))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CancelIOAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().CancelIOAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EnableTransferOwnership(winrt::guid taskId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EnableTransferOwnership(*reinterpret_cast(&taskId)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EnableTransferOwnershipWithConnectedStandbyAction(winrt::guid taskId, int32_t connectedStandbyAction) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EnableTransferOwnership(*reinterpret_cast(&taskId), *reinterpret_cast(&connectedStandbyAction)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TransferOwnership(void* socketId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TransferOwnershipWithContext(void* socketId, void* data) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId), *reinterpret_cast(&data)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Socket(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Socket()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_QualityOfService(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().QualityOfService()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_QualityOfService(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().QualityOfService(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_NoDelay(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NoDelay()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_NoDelay(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().NoDelay(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_KeepAlive(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().KeepAlive()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_KeepAlive(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().KeepAlive(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OutboundBufferSizeInBytes(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OutboundBufferSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_OutboundBufferSizeInBytes(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OutboundBufferSizeInBytes(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OutboundUnicastHopLimit(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OutboundUnicastHopLimit()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_OutboundUnicastHopLimit(uint8_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OutboundUnicastHopLimit(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_LocalPort(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LocalPort()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetEndpointPairsAsync(void* remoteHostName, void* remoteServiceName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetEndpointPairsAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetEndpointPairsWithSortOptionsAsync(void* remoteHostName, void* remoteServiceName, uint32_t sortOptions, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetEndpointPairsAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName), *reinterpret_cast(&sortOptions))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Control(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Control()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Information(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Information()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InputStream(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InputStream()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_ServerCustomValidationRequested(void* eventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().ServerCustomValidationRequested(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ServerCustomValidationRequested(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ServerCustomValidationRequested(*reinterpret_cast(&eventCookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_NoDelay(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NoDelay()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_NoDelay(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().NoDelay(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DesiredUnsolicitedPongInterval(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DesiredUnsolicitedPongInterval()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DesiredUnsolicitedPongInterval(int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DesiredUnsolicitedPongInterval(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ActualUnsolicitedPongInterval(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ActualUnsolicitedPongInterval()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ClientCertificate(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ClientCertificate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ClientCertificate(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClientCertificate(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_OutputStream(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OutputStream()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ConnectAsync(void* uri, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().ConnectAsync(*reinterpret_cast(&uri))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetRequestHeader(void* headerName, void* headerValue) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetRequestHeader(*reinterpret_cast(&headerName), *reinterpret_cast(&headerValue)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_Closed(void* eventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().Closed(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Closed(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Closed(*reinterpret_cast(&eventCookie)); return 0; } int32_t __stdcall CloseWithStatus(uint16_t code, void* reason) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Close(code, *reinterpret_cast(&reason)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Code(uint16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Code()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Reason(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Reason()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_OutboundBufferSizeInBytes(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OutboundBufferSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_OutboundBufferSizeInBytes(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OutboundBufferSizeInBytes(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerCredential(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ServerCredential()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ServerCredential(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ServerCredential(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ProxyCredential(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProxyCredential()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ProxyCredential(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ProxyCredential(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedProtocols(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedProtocols()); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall get_IgnorableServerCertificateErrors(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().IgnorableServerCertificateErrors()); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetStatus(int32_t hresult, int32_t* status) noexcept final try { typename D::abi_guard guard(this->shim()); *status = detach_from(this->shim().GetStatus(hresult)); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_LocalAddress(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LocalAddress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BandwidthStatistics(struct struct_Windows_Networking_Sockets_BandwidthStatistics* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BandwidthStatistics()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Protocol(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Protocol()); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall get_ServerCertificate(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ServerCertificate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerCertificateErrorSeverity(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ServerCertificateErrorSeverity()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerCertificateErrors(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ServerCertificateErrors()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerIntermediateCertificates(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ServerIntermediateCertificates()); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ServerCertificate(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ServerCertificate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerCertificateErrorSeverity(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ServerCertificateErrorSeverity()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerCertificateErrors(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ServerCertificateErrors()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerIntermediateCertificates(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ServerIntermediateCertificates()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Reject() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Reject(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Networking::Sockets { inline ControlChannelTrigger::ControlChannelTrigger(param::hstring const& channelId, uint32_t serverKeepAliveIntervalInMinutes) : ControlChannelTrigger(impl::call_factory([&](IControlChannelTriggerFactory const& f) { return f.CreateControlChannelTrigger(channelId, serverKeepAliveIntervalInMinutes); })) { } inline ControlChannelTrigger::ControlChannelTrigger(param::hstring const& channelId, uint32_t serverKeepAliveIntervalInMinutes, winrt::Windows::Networking::Sockets::ControlChannelTriggerResourceType const& resourceRequestType) : ControlChannelTrigger(impl::call_factory([&](IControlChannelTriggerFactory const& f) { return f.CreateControlChannelTriggerEx(channelId, serverKeepAliveIntervalInMinutes, resourceRequestType); })) { } inline DatagramSocket::DatagramSocket() : DatagramSocket(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto DatagramSocket::GetEndpointPairsAsync(winrt::Windows::Networking::HostName const& remoteHostName, param::hstring const& remoteServiceName) { return impl::call_factory([&](IDatagramSocketStatics const& f) { return f.GetEndpointPairsAsync(remoteHostName, remoteServiceName); }); } inline auto DatagramSocket::GetEndpointPairsAsync(winrt::Windows::Networking::HostName const& remoteHostName, param::hstring const& remoteServiceName, winrt::Windows::Networking::HostNameSortOptions const& sortOptions) { return impl::call_factory([&](IDatagramSocketStatics const& f) { return f.GetEndpointPairsAsync(remoteHostName, remoteServiceName, sortOptions); }); } inline MessageWebSocket::MessageWebSocket() : MessageWebSocket(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline SocketActivityContext::SocketActivityContext(winrt::Windows::Storage::Streams::IBuffer const& data) : SocketActivityContext(impl::call_factory([&](ISocketActivityContextFactory const& f) { return f.Create(data); })) { } inline auto SocketActivityInformation::AllSockets() { return impl::call_factory_cast(*)(ISocketActivityInformationStatics const&), SocketActivityInformation, ISocketActivityInformationStatics>([](ISocketActivityInformationStatics const& f) { return f.AllSockets(); }); } inline auto SocketError::GetStatus(int32_t hresult) { return impl::call_factory([&](ISocketErrorStatics const& f) { return f.GetStatus(hresult); }); } inline StreamSocket::StreamSocket() : StreamSocket(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto StreamSocket::GetEndpointPairsAsync(winrt::Windows::Networking::HostName const& remoteHostName, param::hstring const& remoteServiceName) { return impl::call_factory([&](IStreamSocketStatics const& f) { return f.GetEndpointPairsAsync(remoteHostName, remoteServiceName); }); } inline auto StreamSocket::GetEndpointPairsAsync(winrt::Windows::Networking::HostName const& remoteHostName, param::hstring const& remoteServiceName, winrt::Windows::Networking::HostNameSortOptions const& sortOptions) { return impl::call_factory([&](IStreamSocketStatics const& f) { return f.GetEndpointPairsAsync(remoteHostName, remoteServiceName, sortOptions); }); } inline StreamSocketListener::StreamSocketListener() : StreamSocketListener(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline StreamWebSocket::StreamWebSocket() : StreamWebSocket(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto WebSocketError::GetStatus(int32_t hresult) { return impl::call_factory([&](IWebSocketErrorStatics const& f) { return f.GetStatus(hresult); }); } inline WebSocketKeepAlive::WebSocketKeepAlive() : WebSocketKeepAlive(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif